<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ITPindia &#187; Arduino</title>
	<atom:link href="http://itp.nyu.edu/~ia303/thunk/category/arduino/feed/" rel="self" type="application/rss+xml" />
	<link>http://itp.nyu.edu/~ia303/thunk</link>
	<description>India’s ITP blog</description>
	<lastBuildDate>Fri, 10 Apr 2009 06:20:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Digital Graffiti Glove: Documentation</title>
		<link>http://itp.nyu.edu/~ia303/thunk/2008/12/12/digital-graffiti-glove-documentation/</link>
		<comments>http://itp.nyu.edu/~ia303/thunk/2008/12/12/digital-graffiti-glove-documentation/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 15:00:15 +0000</pubDate>
		<dc:creator>India</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[ICM]]></category>
		<category><![CDATA[PhysComp]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[final project]]></category>
		<category><![CDATA[homework]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[sketch]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[wearables]]></category>

		<guid isPermaLink="false">http://itp.nyu.edu/~ia303/thunk/?p=378</guid>
		<description><![CDATA[
Above is the PowerPoint slideshow that Diego made for our in-class presentation. There is also copious supporting material at the following locations:

Photos, with lots of chatty comments

Videos, interspersed with kittenage
Arduino code
Processing code

colors_highlight_new_swatch – this is the color palette module. It reads a text file containing all the colors in the appropriate Krylon spraypaint line and [...]]]></description>
			<content:encoded><![CDATA[<p><embed src="http://blip.tv/play/AeCfEI_feg" type="application/x-shockwave-flash" width="320" height="270" allowscriptaccess="always" allowfullscreen="true" style="margin-left:30px;"></embed></p>
<p>Above is the PowerPoint slideshow that Diego made for our in-class presentation. There is also copious supporting material at the following locations:<span id="more-378"></span></p>
<ul>
<li>Photos, with lots of chatty comments<br />
<object width="400" height="300"><param name="flashvars" value="&#038;offsite=true&amp;lang=en-us&#038;page_show_url=%2Fphotos%2Findiamos%2Fsets%2F72157609600581342%2Fshow%2F&#038;page_show_back_url=%2Fphotos%2Findiamos%2Fsets%2F72157609600581342%2F&#038;set_id=72157609600581342&#038;jump_to="></param><param name="movie" value="http://www.flickr.com/apps/slideshow/show.swf?v=63961"></param><param name="allowFullScreen" value="true"></param><embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/slideshow/show.swf?v=63961" allowFullScreen="true" flashvars="&#038;offsite=true&amp;lang=en-us&#038;page_show_url=%2Fphotos%2Findiamos%2Fsets%2F72157609600581342%2Fshow%2F&#038;page_show_back_url=%2Fphotos%2Findiamos%2Fsets%2F72157609600581342%2F&#038;set_id=72157609600581342&#038;jump_to=" width="400" height="300"></embed></object></li>
<li><a href="http://itpindia.blip.tv/">Videos</a>, interspersed with kittenage</li>
<li><a href="http://itp.nyu.edu/~ia303/PhysComp/final/graffiti_glove_4_sensors.zip">Arduino code</a></li>
<li>Processing code
<ul>
<li><a href="http://itp.nyu.edu/~ia303/ICM/final/colors_highlight_new_swatch/applet/index.html">colors_highlight_new_swatch</a> – this is the color palette module. It reads a text file containing all the colors in the appropriate Krylon spraypaint line and outputs them as a grid of colored squares. The active swatch and rolled-over ones are highlighted with colored borders. It&#8217;s glitchy, as you can see if you look in the upper left corner, but basically it works.</li>
<li><a href="http://itp.nyu.edu/~ia303/ICM/final/spraycans/applet/index.html">spraycans</a> – I would like to make my own set of brushes, based on Diego&#8217;s, that are all the same style but in different sizes. These would then be mapped to the number of fingers being held up, with more fingers triggering a bigger spray cone. This would make it easier for users to get predictable, slightly repeatable results. Toward that end, I made a spraycan object whose spray cone, label number (for the size), and can color (for the paint) are variable. Epileptics should probably not view this sketch.</li>
<li><a href="http://itp.nyu.edu/~ia303/ICM/final/final_application_4/applet/index.html">Main application</a> – The &#8220;final&#8221; in &#8220;final_application_4&#8243; refers to the this being our final project for the semester, not to the code itself actually being final. For, verily, it is not. This is the wrapper into which all the other modules will eventually be rolled. It&#8217;s a whole lot of nested if statements and functions. This program doesn&#8217;t run unless the glove is plugged in; I should fix that, to make it easier to check code while programming.</a></li>
</ul>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://itp.nyu.edu/~ia303/thunk/2008/12/12/digital-graffiti-glove-documentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Baby steps</title>
		<link>http://itp.nyu.edu/~ia303/thunk/2008/12/03/baby-steps/</link>
		<comments>http://itp.nyu.edu/~ia303/thunk/2008/12/03/baby-steps/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 04:22:45 +0000</pubDate>
		<dc:creator>India</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[CommLab]]></category>
		<category><![CDATA[ICM]]></category>
		<category><![CDATA[final project]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[sketch]]></category>

		<guid isPermaLink="false">http://itp.nyu.edu/~ia303/thunk/?p=338</guid>
		<description><![CDATA[
This is the second smidgen of the code for our final project. It pulls RGB values and color names from a tab-delimited text file (which is, itself, based on the actual Krylon color options) and outputs this grid of swatches. The swatches don&#8217;t do anything yet&#8212;just drawing them took me, like, two days, thank you [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://itp.nyu.edu/~ia303/ICM/final/parse_Krylon_colors/applet/index.html"><img src="http://itp.nyu.edu/~ia303/thunk/wp-content/uploads/krylon_palette.png" alt="grid of 61 colored squares" title="Krylon color palette" width="400" height="355" class="alignnone size-full wp-image-340" /></a></p>
<p>This is the second smidgen of the code for our final project. <a href="http://itp.nyu.edu/~ia303/ICM/final/parse_Krylon_colors/applet/index.html">It</a> pulls RGB values and color names from <a href="http://itp.nyu.edu/~ia303/ICM/final/parse_Krylon_colors/data/Krylon_colors.txt">a tab-delimited text file</a> (which is, itself, based on the <a href="http://www.krylon.com/products/indooroutdoor_paint/">actual Krylon color options</a>) and outputs this grid of swatches. The swatches don&#8217;t <em>do</em> anything yet&#8212;just drawing them took me, like, two days, thank you very much, and that was <em>with</em> some very helpful help from Shawn. Partly this is because I apparently can&#8217;t keep in my head for more than thirty seconds how arrays and objects work, and partly it&#8217;s because I just. can&#8217;t. focus. And partly it&#8217;s because I apparently have no idea what the fuck I&#8217;m doing.</p>
<p>I&#8217;m beginning to really like Diego&#8217;s Plan B, as proposed over the weekend: </p>
<blockquote><p>
	Fake our own deaths.
</p></blockquote>
<p><span id="more-338"></span><br />
I keep telling myself I have to not panic and just write the code one piece at a time. Then, later, I can get somebody to help me put it all together, which is something I <em>know</em> I have no clue how to do. But just accomplishing what seem like they should be simple things is stumping me. Most recently, I was trying to get the swatch name to be displayed when a square is rolled over. This is not by any means an important feature&#8212;in fact, it doesn&#8217;t really serve any purpose. But I <em>should</em> be able to do it, and I can&#8217;t figure out why it doesn&#8217;t work. I keep getting errors like &#8220;The function showName() does not exist&#8221; or &#8220;Cannot find anything named &#8217;swatches.&#8217;&#8221; Both of these things do, of course, exist, and I can&#8217;t see any reason why they wouldn&#8217;t be found.</p>
<p>I know it&#8217;s pretty rare for computers to just <em>fuck up</em> and much more common for <em>me</em> to do so, so I&#8217;m sure the answer is that I&#8217;ve done something really dumb and sloppy somewhere. But it could easily take me two hours to find that error, and every new goddamn line of code seems to cause some new mysterious issue. I can feel myself growing older just thinking about it. And there are a lot more lines of code to go. Here&#8217;s the stuff I was hoping to get done, oh, by, say, last Thursday: </p>
<div style="background-color:#333; padding:10px;">
<h3>Graffiti Glove Components</h3>
<h4>Brush selector</h4>
<ul>
<li>
			Read flex sensor data </p>
<ul>
<li style="list-style-type: circle;">
					1 finger = marker
				</li>
<li style="list-style-type: circle;">
					2 fingers = small spray
				</li>
<li style="list-style-type: circle;">
					3 fingers = medium spray
				</li>
<li style="list-style-type: circle;">
					4 fingers = large spray
				</li>
</ul>
</li>
</ul>
<h4>Color selector</h4>
<ul>
<li>
			Display grid of color swatches
		</li>
<li>
			Display color name on rollover
		</li>
<li>
			Highlight selected swatch on click
		</li>
<li>
			Change drawing color on click
		</li>
</ul>
<h4>Erase</h4>
<ul>
<li>
			Ask for confirmation
		</li>
</ul>
<h4>Undo</h4>
<ul>
<li>
			Undo last stroke
		</li>
<li>
			Redo stroke that was just undone
		</li>
</ul>
<h4>Save drawing</h4>
<ul>
<li>
			Ask for file name
		</li>
<li>
			Append time stamp
		</li>
<li>
			Display confirmation
		</li>
</ul>
<h4>Change background</h4>
<ul>
<li>
			Display four background thumbnails </p>
<ul>
<li style="list-style-type: circle;">
					subway car
				</li>
<li style="list-style-type: circle;">
					brick wall
				</li>
<li style="list-style-type: circle;">
					white van
				</li>
<li style="list-style-type: circle;">
					blank
				</li>
</ul>
</li>
</ul>
<h4>Paint in spray pattern</h4>
<ul>
<li>
<p>			Draw an ellipse
		</li>
<li>
			Make random pixels within the ellipse transparent
		</li>
</ul>
<h4>Switch modes</h4>
<ul>
<li>
			Save drawing
		</li>
<li>
			Display palette
		</li>
<li>
			Hide palette
		</li>
<li>
			Restore drawing
		</li>
</ul>
</div>
<p>And that&#8217;s not including the task of sewing us a new glove, for which I bought fabric on Monday, as well as a book about how to use my virgin four-year-old Juki serger. I know that&#8217;ll be fun once I get started, but I just can&#8217;t get started.</p>
<p>Maybe I need a drink.</p>
]]></content:encoded>
			<wfw:commentRss>http://itp.nyu.edu/~ia303/thunk/2008/12/03/baby-steps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Assistive Tech for Asbo Avoidance</title>
		<link>http://itp.nyu.edu/~ia303/thunk/2008/11/24/assistive-tech-for-asbo-avoidance/</link>
		<comments>http://itp.nyu.edu/~ia303/thunk/2008/11/24/assistive-tech-for-asbo-avoidance/#comments</comments>
		<pubDate>Mon, 24 Nov 2008 22:50:07 +0000</pubDate>
		<dc:creator>India</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[ICM]]></category>
		<category><![CDATA[PhysComp]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[final project]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[wearables]]></category>

		<guid isPermaLink="false">http://itp.nyu.edu/~ia303/thunk/?p=318</guid>
		<description><![CDATA[
So then . . . The other day I was talking about the glove project with my friend Rose, and I rhetorically asked what the hell this kind of low-fi, large-format drawing setup would be good for. Rose&#8217;s answer was immediate: graffiti.
Duh.

So then, what we need is just a limited palette of Krylon spray paints, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/rubberdreamfeet/347009229/"><img src="http://itp.nyu.edu/~ia303/thunk/wp-content/uploads/asbo.jpg" alt="asbo graffiti" title="asbo graffiti" width="400" height="236" class="alignnone size-full wp-image-321" /></a></p>
<p>So <em>then</em> . . . The other day I was talking about the glove project with my friend Rose, and I rhetorically asked what the hell this kind of low-fi, large-format drawing setup would be good for. Rose&#8217;s answer was immediate: graffiti.</p>
<p>Duh.<br />
<span id="more-318"></span><br />
So then, what we need is just a limited <a href="http://www.krylon.com/products/indooroutdoor_paint/">palette of Krylon spray paints</a>, and a couple of brush types&#8212;say, a fat marker and three sizes of spray patterns. And then, when I asked my perpetual question of &#8220;What are the other fingers doing?,&#8221; Diego had this brilliant idea: the number of fingers you&#8217;re using determines the brush size. Index finger for the marker; index and middle for a small spray nozzle; index, middle, and ring for a medium spray; and all four fingers for the biggest spray&#8212;what you&#8217;d use to fill. That&#8217;s a pretty intuitive mapping. We wouldn&#8217;t need to track motion on all the fingers, just whether they&#8217;re flexed or not. And we could use an accelerometer to register wrist tilts, somewhat like the <a href="http://www.youtube.com/watch?v=A9DBlolfZd4">Rock &#8216;n&#8217; Scroll</a>, to cycle through the color palette.</p>
<p>The thumb would remain an on/off switch.</p>
<p>We could have different backgrounds to paint on, like brick walls, subway cars, trucks.</p>
<p>Bitchen.</p>
<p>This idea is, in fact, so cool that it has <a href="http://video.google.com/videosearch?q=virtual+graffiti&#038;ie=UTF-8&#038;oe=utf-8&#038;rls=org.mozilla:en-US:official&#038;client=firefox-a&#038;um=1&#038;sa=X&#038;oi=video_result_group&#038;resnum=10&#038;ct=title#">already</a> <a href="http://www.slashgear.com/wiispray-prototype-graffiti-controller-for-wii-0611925/">been</a> <a href="http://graffiti.playdo.com/">done</a>.</p>
<p>Developing . . .</p>
<p><span style="font-size:smaller">Photo: <a href="http://www.flickr.com/photos/rubberdreamfeet/347009229/">ASBO</a> by rubberdreamfeet  / David Hayward. <a href="http://creativecommons.org/licenses/by-nc-sa/2.0/deed.en">Some rights reserved.</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://itp.nyu.edu/~ia303/thunk/2008/11/24/assistive-tech-for-asbo-avoidance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MC Squared</title>
		<link>http://itp.nyu.edu/~ia303/thunk/2008/10/24/mc-squared/</link>
		<comments>http://itp.nyu.edu/~ia303/thunk/2008/10/24/mc-squared/#comments</comments>
		<pubDate>Fri, 24 Oct 2008 07:35:11 +0000</pubDate>
		<dc:creator>India</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[PhysComp]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[homework]]></category>
		<category><![CDATA[lab]]></category>
		<category><![CDATA[midterm]]></category>
		<category><![CDATA[sketch]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://itp.nyu.edu/~ia303/thunk/?p=154</guid>
		<description><![CDATA[
Get it now! Detailed, full-color documentation of the famed MC Squared midterm project!
MC_Squared(fin).pdf (14.68 MB; sorry, it contains a couple of embedded videos)
We gave our presentation today, the thing mostly worked, and it wasn&#8217;t too embarrassing. And, unlike some people in the class, my group actually got two or three hours of precious, golden sleep [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://itp.nyu.edu/~ia303/PhysComp/midterm/MC_Squared(fin).pdf"><img src="http://itp.nyu.edu/~ia303/thunk/wp-content/uploads/thumbnails.gif" alt="MC Squared documentation thumbnails" title="MC Squared documentation thumbnails" width="356" height="409" class="alignnone size-full wp-image-157" /></a></p>
<p>Get it now! Detailed, full-color documentation of the famed MC Squared midterm project!</p>
<p><a href="http://itp.nyu.edu/~ia303/PhysComp/midterm/MC_Squared(fin).pdf">MC_Squared(fin).pdf</a> (14.68 MB; sorry, it contains a couple of embedded videos)</p>
<p>We gave our presentation today, the thing mostly worked, and it wasn&#8217;t too embarrassing. And, unlike some people in the class, my group actually got two or three hours of precious, golden <em>sleep</em> the night&#8212;well, morning&#8212;before. (We closed down the floor at about 3:30 a.m., but a few of our classmates relocated to the library or some such place to keep working. Everybody seemed pretty crispy by 9:30 this morning.)</p>
]]></content:encoded>
			<wfw:commentRss>http://itp.nyu.edu/~ia303/thunk/2008/10/24/mc-squared/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PhysComp, week 6: Bride of Serial Out</title>
		<link>http://itp.nyu.edu/~ia303/thunk/2008/10/16/physcomp-week-6-bride-of-serial-out/</link>
		<comments>http://itp.nyu.edu/~ia303/thunk/2008/10/16/physcomp-week-6-bride-of-serial-out/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 07:07:42 +0000</pubDate>
		<dc:creator>India</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[PhysComp]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[homework]]></category>
		<category><![CDATA[lab]]></category>
		<category><![CDATA[sketch]]></category>

		<guid isPermaLink="false">http://itp.nyu.edu/~ia303/thunk/?p=140</guid>
		<description><![CDATA[This week&#8217;s lab was mostly uneventful, although it took me something like six hours to do&#8212;I started after our CommLab make-up class ended, around 4 pm, and stayed until nine or ten.
First I thought I&#8217;d use one of these nifty sensors I got from SparkFun, 

but then I realized I have no idea how you&#8217;re [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://itp.nyu.edu/physcomp/Labs/SerialDuplex">This week&#8217;s lab</a> was mostly uneventful, although it took me something like six hours to do&#8212;I started after our CommLab make-up class ended, around 4 pm, and stayed until nine or ten.</p>
<p>First I thought I&#8217;d use one of these nifty sensors I got from SparkFun, </p>
<p><a href="http://www.flickr.com/photos/indiamos/2943803298/" title="PComp lab, week 5: Serial Out by indiamos, on Flickr"><img src="http://farm4.static.flickr.com/3031/2943803298_1f73c40d47_m.jpg" width="240" height="180" alt="PComp lab, week 5: Serial Out" /></a></p>
<p>but then I realized I have no idea how you&#8217;re supposed to hook them up. Stick the pins straight into the breadboard? Solder wires on? How long should the wires be? So instead I used the stupid knob again, plus one of the IRs I bought for our midterm project.</p>
<p>The thrill of the knob has totally worn off. Then I saw Jorge soldering wires to an ultrasonic range finder just like the one I have, and I thought maybe it was a good time to try out my own. Ha! Thus began one of my more frustrating soldering bouts so far.</p>
<p><a href="http://www.flickr.com/photos/indiamos/2943803750/" title="Helping hands by indiamos, on Flickr"><img src="http://farm4.static.flickr.com/3221/2943803750_eb43911272_m.jpg" width="240" height="180" alt="Helping hands" /></a></p>
<p>It must have taken me forty-five minutes to solder three freaking wires onto this cookie . . . and then it took me another hour to realize that the reason it wasn&#8217;t working was that I&#8217;d soldered the yellow wire to the wrong hole. And then I couldn&#8217;t get it <em>un</em>soldered to save my life, so I just attached a fourth wire.</p>
<p>Finally I got them all hooked up:</p>
<p><a href="http://www.flickr.com/photos/indiamos/2942944227/" title="1 digital + 2 analog by indiamos, on Flickr"><img src="http://farm4.static.flickr.com/3206/2942944227_264e83109e_m.jpg" width="180" height="240" alt="1 digital + 2 analog" /></a></p>
<p>And then, there was serial output:</p>
<ul>
<li><a href="http://www.flickr.com/photos/indiamos/2946608608/in/set-72157607212375323/">&#8220;Now you get a range of garbage characters.&#8221;</a></li>
<li><a href="http://www.flickr.com/photos/indiamos/2946608692/in/set-72157607212375323/">&#8220;List all the available serial ports.&#8221;</a></li>
<li><code> <a href="http://www.flickr.com/photos/indiamos/2946609060/in/set-72157607212375323/">// print out the values you got:</a><br />
    for (int sensorNum = 0; sensorNum < sensors.length; sensorNum++) {<br />
      print("Sensor " + sensorNum + ": " + sensors[sensorNum] + "\t");<br />
    }<br />
    // add a linefeed after all the sensor values are printed:<br />
    println();</code></li>
</ul>
<p>Et cetera.</p>
<p>After all that hair-pulling, the ultrasonic sensor was giving me really erratic readings (then again, so was the push-button switch: its value didn't change when I <em>pushed</em> the button, but it did when I <em>touched</em> the button). So I switched to two IR sensors, since I had so many lying around.</p>
<p>Then I got to the part about the handshake. Handshaking? Was not happening for me. I think it may have had something to do with this:</p>
<p><a href="http://www.flickr.com/photos/indiamos/2945745779/" title="PhysComp homework, week 6: serial out 2: 15 by indiamos, on Flickr"><img src="http://farm4.static.flickr.com/3203/2945745779_02eb104340_m.jpg" width="226" height="240" alt="PhysComp homework, week 6: serial out 2: 15" /></a> <a href="http://www.flickr.com/photos/indiamos/2945745813/" title="PhysComp homework, week 6: serial out 2: 16 by indiamos, on Flickr"><img src="http://farm4.static.flickr.com/3049/2945745813_3abc083f17_m.jpg" width="226" height="240" alt="PhysComp homework, week 6: serial out 2: 16" /></a></p>
<p>The Processing application was looking for the word "hello," but the Arduino didn't seem to be able to say the word without stuttering horribly. I tried for more than an hour, I think, to get them to talk to each other, but finally I had to just give up.</p>
]]></content:encoded>
			<wfw:commentRss>http://itp.nyu.edu/~ia303/thunk/2008/10/16/physcomp-week-6-bride-of-serial-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PhysComp midterm project, week 2: Rough prototype</title>
		<link>http://itp.nyu.edu/~ia303/thunk/2008/10/15/midterm-project-week-2-rough-prototype/</link>
		<comments>http://itp.nyu.edu/~ia303/thunk/2008/10/15/midterm-project-week-2-rough-prototype/#comments</comments>
		<pubDate>Wed, 15 Oct 2008 15:35:02 +0000</pubDate>
		<dc:creator>India</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[ICM]]></category>
		<category><![CDATA[PhysComp]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[homework]]></category>
		<category><![CDATA[lab]]></category>
		<category><![CDATA[midterm]]></category>
		<category><![CDATA[sketch]]></category>

		<guid isPermaLink="false">http://itp.nyu.edu/~ia303/thunk/?p=123</guid>
		<description><![CDATA[
Part 2 in the saga that began last week.
After spending about an hour playing with the Minim library in Processing, I went into the lab to see if I could get it to work with actual input from our IR sensors. This was basically a repeat of this week&#8217;s homework, which I&#8217;d done, for once, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/indiamos/2943757274/" title="A semi-working prototype! by indiamos, on Flickr"><img src="http://farm4.static.flickr.com/3234/2943757274_c221cdf116.jpg" width="450" height="282" alt="A semi-working prototype!" /></a></p>
<p>Part 2 in <a href="http://itp.nyu.edu/~ia303/thunk/2008/10/09/midterm-project-week-1-observation/">the saga that began last week</a>.</p>
<p>After spending about an hour playing with the <a href="http://code.compartmental.net/tools/minim/">Minim</a> library in Processing, I went into the lab to see if I could get it to work with actual input from our IR sensors. This was basically a repeat of this week&#8217;s homework, which I&#8217;d done, for once, <em>before</em> the morning it was due, so the wiring part was uncharacteristically easy. I need to get some header pins, though; the stranded wire on the IR sensors is a pain to plug into a breadboard.</p>
<p>So our project&#8212;which I realize I didn&#8217;t explain last week&#8212;is going to be a cubeoid musical (or, at least, noisy) instrument with an infrared sensor set into each side, mounted corner-up (<a href="http://www.flickr.com/photos/indiamos/2926903690/">as demonstrated by Diego</a>) on a camera tripod. One or more players can then use their hands or other body parts or utensils or pets to trigger different sounds from each side. We were thinking that for Phase One, i.e., this week, we&#8217;d have the sounds be synthesized tones, and that for Phase Two, the final version, we&#8217;d make it play various different loops.</p>
<p>It turned out, however, that it&#8217;s far easier&#8212;for me, at least&#8212;to get Minim to play loops than to synthesize sounds. And there are a lot of free sound clips out there in the world. I got mine from <a href="http://www.canadianmusicartists.com/samples.html">CanadianMusicArtists.com</a>. This pre-prototype, therefore, has only two sensors, both of which trigger audio loops. It also has the beginnings of a lame-ass bouncing ball animation, but it doesn&#8217;t do what I want it to do, mostly because the signal&#8217;s changing too rapidly. Graphics were a tentative feature for Phase Two, so I&#8217;m not going to fuss with that part any more this week.</p>
<p>Here&#8217;s some crappy video of Filippo (left) and Diego (right) making the sensors generate noise. You can barely hear it, unfortunately&#8212;listen for the annoying rapid clicking sound, which I think is the hi-hat sound. </p>
<p><embed src="http://blip.tv/play/AdOvdI_feg" type="application/x-shockwave-flash" width="320" height="270" allowscriptaccess="always" allowfullscreen="true"></embed> </p>
<p>The beauty part? This doubles as my <a href="http://itp.nyu.edu/~sve204/icm_fall08/">ICM</a> homework.</p>
<p>Here&#8217;s the Arduino code:</p>
<blockquote><p><code>/*  Reads data from two analog sensors (IR sensors, in this specific example)<br />
    and outputs the values in a format that can be easily parsed in Processing.<br />
*/</p>
<p>int ledPin = 7;<br />
int irSensor0 = 0;<br />
int irSensor1 = 1;<br />
int sensorValue = 0;</p>
<p>void setup()<br />
{<br />
    //  Flash the LED three times to announce the start of program.<br />
    pinMode( 7, OUTPUT );<br />
    digitalWrite( 7, LOW );<br />
    delay( 300 );<br />
    digitalWrite( 7, HIGH );<br />
    delay( 300 );<br />
    digitalWrite( 7, LOW );<br />
    delay( 300 );<br />
    digitalWrite( 7, HIGH );<br />
    delay( 300 );<br />
    digitalWrite( 7, LOW );<br />
    delay( 300 );<br />
    digitalWrite( 7, HIGH );<br />
    delay( 300 );<br />
    digitalWrite( 7, LOW );</p>
<p>    // Start serial port at 9600 bps:<br />
    Serial.begin( 9600 );<br />
}</p>
<p>void loop()<br />
{<br />
    if (Serial.available() > 0)<br />
    {<br />
    //  Read the first (0) sensor:<br />
    sensorValue = analogRead( irSensor1 );</p>
<p>    // print the results:<br />
    Serial.print( sensorValue, DEC );<br />
    Serial.print( "\t" );</p>
<p>    // read the second (1) sensor:<br />
    sensorValue = analogRead( irSensor0 );<br />
    // print the results:<br />
    Serial.println( sensorValue, DEC );</p>
<p>    //  Follow the last sensor value with a println() so that<br />
    //  each set of four readings prints on a line by itself:<br />
    Serial.println( sensorValue, DEC );<br />
    //  delay ( 100 );<br />
    }<br />
}</code></p></blockquote>
<p>And here&#8217;s the  <a href="http://itp.nyu.edu/~ia303/ICM/week6/music_box_2xIR/applet/music_box_2xIR.pde">Processing code</a>, where most of the excitement takes place.</p>
]]></content:encoded>
			<wfw:commentRss>http://itp.nyu.edu/~ia303/thunk/2008/10/15/midterm-project-week-2-rough-prototype/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PhysComp, week 5: Serial Out</title>
		<link>http://itp.nyu.edu/~ia303/thunk/2008/10/09/physcomp-week-5-serial-out/</link>
		<comments>http://itp.nyu.edu/~ia303/thunk/2008/10/09/physcomp-week-5-serial-out/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 12:54:11 +0000</pubDate>
		<dc:creator>India</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[PhysComp]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[homework]]></category>
		<category><![CDATA[lab]]></category>
		<category><![CDATA[sketch]]></category>

		<guid isPermaLink="false">http://itp.nyu.edu/~ia303/thunk/?p=108</guid>
		<description><![CDATA[
I was trying to figure out the math to make part of the graph show up as brown&#8212;i.e., earth&#8212;and then scatter flowers on top, but something wasn&#8217;t working out and I was running late, so I gave up.
Anyway, here are the progress shots:
Setup:

Pot hooked up:

Blinking LED:

I also shot a fascinating movie of the program loading [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://itp.nyu.edu/~ia303/thunk/wp-content/uploads/picture-7.png"><img src="http://itp.nyu.edu/~ia303/thunk/wp-content/uploads/picture-7.png" alt="" title="Serial out graph" width="480" height="357" class="alignnone size-full wp-image-109" /></a></p>
<p>I was <em>trying</em> to figure out the math to make part of the graph show up as brown&#8212;i.e., earth&#8212;and then scatter flowers on top, but something wasn&#8217;t working out and I was running late, so I gave up.</p>
<p>Anyway, here are the progress shots:</p>
<p>Setup:<br />
<a href="http://www.flickr.com/photos/indiamos/2926906248/" title="P1000190.JPG by indiamos, on Flickr"><img src="http://farm4.static.flickr.com/3098/2926906248_38d7beec10_m.jpg" width="240" height="180" alt="P1000190.JPG" /></a></p>
<p>Pot hooked up:<br />
<a href="http://www.flickr.com/photos/indiamos/2926907936/" title="P1000199.JPG by indiamos, on Flickr"><img src="http://farm4.static.flickr.com/3239/2926907936_52047b2cea_m.jpg" width="240" height="180" alt="P1000199.JPG" /></a></p>
<p>Blinking LED:<br />
<a href="http://www.flickr.com/photos/indiamos/2926055893/" title="P1000204.JPG by indiamos, on Flickr"><img src="http://farm4.static.flickr.com/3269/2926055893_09a3388587_m.jpg" width="240" height="180" alt="P1000204.JPG" /></a></p>
<p>I also shot a <em>fascinating</em> movie of the program loading on the Arduino and starting up&#8212;you know, flickering yellow light, then blinking LED; hot stuff:</p>
<p><embed src="http://blip.tv/play/AdKrL4_feg" type="application/x-shockwave-flash" width="320" height="270" allowscriptaccess="always" allowfullscreen="true"></embed> </p>
<p>Final code on Arduino:</p>
<blockquote><p><code>int potPin = 0;<br />
int potValue = 0;<br />
int ledPin = 2;</p>
<p>void setup()<br />
{<br />
  // flash LED three times to announce start of program<br />
  pinMode( 2, OUTPUT );<br />
  digitalWrite( 2, LOW );<br />
  delay( 500 );<br />
  digitalWrite( 2, HIGH );<br />
  delay( 500 );<br />
  digitalWrite( 2, LOW );<br />
  delay( 500 );<br />
  digitalWrite( 2, HIGH );<br />
  delay( 500 );<br />
  digitalWrite( 2, LOW );<br />
  delay( 500 );<br />
  digitalWrite( 2, HIGH );<br />
  delay( 500 );<br />
  digitalWrite( 2, LOW );<br />
  delay( 500 );<br />
  digitalWrite( 2, HIGH );</p>
<p>  // start serial port at 9600 bps:<br />
  Serial.begin( 9600 );<br />
}</p>
<p>void loop()<br />
{<br />
  // read analog input, divide by 4 to fit it in the range 0-255:<br />
  potValue = analogRead( potPin );<br />
  potValue = potValue / 4;<br />
  Serial.print( potValue, BYTE );<br />
  // pause for 10 milliseconds:<br />
  delay( 10 );<br />
}<br />
</code></p></blockquote>
<p><a href="http://itp.nyu.edu/~ia303/PhysComp/week5/graph_serial_from_pot/applet/">Final Processing applet</a></p>
]]></content:encoded>
			<wfw:commentRss>http://itp.nyu.edu/~ia303/thunk/2008/10/09/physcomp-week-5-serial-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Servo</title>
		<link>http://itp.nyu.edu/~ia303/thunk/2008/09/26/servo/</link>
		<comments>http://itp.nyu.edu/~ia303/thunk/2008/09/26/servo/#comments</comments>
		<pubDate>Fri, 26 Sep 2008 15:13:08 +0000</pubDate>
		<dc:creator>India</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[CommLab]]></category>
		<category><![CDATA[PhysComp]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[homework]]></category>
		<category><![CDATA[lab]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://itp.nyu.edu/~ia303/thunk/?p=65</guid>
		<description><![CDATA[Two birds, one stone:
																		
															Crank your speakers and click to play					
Sorry about the wobbles.
This is my video journal of the Servo lab for PhysComp, filmed for CommLab on a Sanyo Xacti 6MP digital movie camera.
I tried to edit this within the Xacti, but I ended up joining the clips together in the wrong order. It was [...]]]></description>
			<content:encoded><![CDATA[<p>Two birds, one stone:<br />
													<script type="text/javascript" src="http://blip.tv/scripts/pokkariPlayer.js?ver=2008010901"></script>					<script type="text/javascript" src="http://blip.tv/syndication/write_player?skin=js&#038;posts_id=1303395&#038;source=3&#038;autoplay=true&#038;file_type=flv&#038;player_width=&#038;player_height="></script>
<div id="blip_movie_content_1303395">					<a rel="enclosure" href="http://blip.tv/file/get/Indiamos-Servo401.mov" onclick="play_blip_movie_1303395(); return false;"><img title="Click to play" alt="Video thumbnail. Click to play"  src="http://blip.tv/file/get/Indiamos-Servo401.mov.jpg" border="0" title="Click To Play" /></a>					<br />					<a rel="enclosure" href="http://blip.tv/file/get/Indiamos-Servo401.mov" onclick="play_blip_movie_1303395(); return false;">Crank your speakers and click to play</a>					</div>
<p>Sorry about the wobbles.</p>
<p>This is my video journal of the <a href="http://itp.nyu.edu/physcomp/Labs/Servo">Servo lab</a> for <a href="http://itp.nyu.edu/physcomp/">PhysComp</a>, filmed for <a href="http://www.spencerkiser.com/commLab/commLab.html">CommLab</a> on a Sanyo Xacti 6MP digital movie camera.</p>
<p>I tried to edit this within the Xacti, but I ended up joining the clips together in the wrong order. It was way too much work to separate them again&#8212;it&#8217;s just a lousy way to edit&#8212;so then I dumped the mess into iMovie HD (an older version, <a href="http://brepettis.com/blog/2008/06/19/getting-started-in-video-editing-and-publishing/">recommended by Bre Pettis</a> in his very fine <a href="http://www.etsy.com/storque/search/title/getting-started-in-video/">Getting Started in Video</a> series), recut and rearranged it, and added title frames from Photoshop (too bad they look like crap after compression) and <a href="http://kristinhersh.cashmusic.org/">CC-licensed music by the excellent Kristin Hersh</a>. This was my first time using iMovie; I found it reasonably intuitive.</p>
<p>So, basically, it&#8217;s just the worst video for a Kristin Hersh song ever. Rock on.</p>
]]></content:encoded>
			<wfw:commentRss>http://itp.nyu.edu/~ia303/thunk/2008/09/26/servo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://blip.tv/file/get/Indiamos-Servo401.mov" length="9933336" type="video/quicktime" />
		</item>
		<item>
		<title>PhysComp lab, week 2: Analog In</title>
		<link>http://itp.nyu.edu/~ia303/thunk/2008/09/18/analog-in/</link>
		<comments>http://itp.nyu.edu/~ia303/thunk/2008/09/18/analog-in/#comments</comments>
		<pubDate>Thu, 18 Sep 2008 07:42:07 +0000</pubDate>
		<dc:creator>India</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[PhysComp]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[homework]]></category>
		<category><![CDATA[lab]]></category>

		<guid isPermaLink="false">http://itp.nyu.edu/blogs/ia303/2008/09/18/analog-in/</guid>
		<description><![CDATA[Ah, another brilliant demonstration of my utter lostness in the field of electronics!
 
I managed to strip three wires in less than five minutes&#8212;a huge improvement over last week&#8212;but I still suck at soldering:

My hands shake a lot, I&#8217;ve learned. Also, I can&#8217;t see. I had to bring in the nasty fluorescent work light that [...]]]></description>
			<content:encoded><![CDATA[<p>Ah, another brilliant demonstration of my utter lostness in the field of electronics!</p>
<p><a href="http://www.flickr.com/photos/indiamos/2867514134/" title="Hooked wires and potentiometer, on Flickr"><img src="http://farm3.static.flickr.com/2367/2867514134_87296b1224.jpg" width="400" height="300" alt="Hooked wires and potentiometer" /></a> <span id="more-19"></span></p>
<p>I managed to strip three wires in less than five minutes&#8212;a huge improvement over last week&#8212;but I still suck at soldering:</p>
<p><a href="http://www.flickr.com/photos/indiamos/2866683113/" title="Bad soldering, on Flickr"><img src="http://farm4.static.flickr.com/3250/2866683113_43d741d9f7.jpg" width="400" height="300" alt="Bad soldering" /></a></p>
<p>My hands shake a lot, I&#8217;ve learned. Also, I can&#8217;t see. I had to bring in the nasty fluorescent work light that I use when I&#8217;m doing proofreading, and even then I had to get my eyes down so close to what I was soldering that I almost soldered my face. Another thing I&#8217;ve learned thus far is that you basically get one chance at making each join. If you mess up on the first try, any attempts to fix it just seem to make matters worse. And smoky.</p>
<p>The first part of <a href="http://itp.nyu.edu/physcomp/Labs/AnalogIn">this assignment</a> went smoothly. I had no problem matching my setup to <a href="http://itp.nyu.edu/physcomp/uploads/arduino_pot_led.jpg">the photo in the instructions</a>, and turning the knob actually did what it was supposed to do. Yay!</p>
<p><a href="http://www.flickr.com/photos/indiamos/2866683683/" title="Add a potentiometer and LED, on Flickr"><img src="http://farm4.static.flickr.com/3164/2866683683_52a49b459c.jpg" width="400" height="300" alt="Add a potentiometer and LED" /></a></p>
<p>Bright vs. Dim<br />
<a href="http://www.flickr.com/photos/indiamos/2867516464/" title="Lit red LED by indiamos, on Flickr"><img src="http://farm4.static.flickr.com/3183/2867516464_710847b24a_m.jpg" width="240" height="180" alt="Lit red LED" /></a> <a href="http://www.flickr.com/photos/indiamos/2867516756/" title="Dim red LED by indiamos, on Flickr"><img src="http://farm4.static.flickr.com/3033/2867516756_6562fe171f_m.jpg" width="240" height="180" alt="Dim red LED" /></a></p>
<p>(I know it doesn&#8217;t look very dim, but trust me.)</p>
<p>Swapping in other kinds of variable resistors required my actually thinking, however, and that part didn&#8217;t go so well.</p>
<p>I had wanted to get a flex sensor, but the computer store suddenly changed its hours&#8212;I guess because we&#8217;re three weeks into the semester?&#8212;and was closed five minutes before I arrived. So no Hug-O-Meter for me. Instead, I rewired the board with a photocell, a thermistor, and two LEDs, per the <a href="http://itp.nyu.edu/physcomp/uploads/bb_dualflex_b.jpg">other photo</a>, and then changed the code accordingly. Only one of the LEDs was responding, though, and it was the wrong one. Covering the photocell made the green LED dim instead of the red one. So I fiddled with the code a bit, checking the Serial.print output to see if the thermistor was doing anything at all, and eventually I turned around the red LED.</p>
<p>Aaah. I really need to learn which leg of an LED goes where.</p>
<p>So then both LEDs were lit, and the red one was responding to the photocell, but the green one wasn&#8217;t doing squat. I fiddled with <a href="http://itp.nyu.edu/~ia303/PhysComp/week2/Analog_In_Arduino_code.txt">the code</a> some more, changing  <code>analogWrite(ledB, potValueB/4);</code> to   <code>analogWrite(ledB, potValueB*4);</code>, but that didn&#8217;t do anything. So I took out the resistor (a 220) that was adjacent to the thermistor, and the Serial.print numbers shot up and the LED got a lot brighter. So then I swapped in different resistors: 10 was no good, 100 was no good, but 1,000 did the trick: finally, the changes in brightness were visible.</p>
<p>Both LEDs off:<br />
<a href="http://www.flickr.com/photos/indiamos/2866686143/" title="LEDs off by indiamos, on Flickr"><img src="http://farm4.static.flickr.com/3053/2866686143_be41227fd4_m.jpg" width="240" height="180" alt="LEDs off" /></a></p>
<p>Both LEDs on:<br />
<a href="http://www.flickr.com/photos/indiamos/2866686345/" title="LEDs on by indiamos, on Flickr"><img src="http://farm4.static.flickr.com/3138/2866686345_3ca5363b38_m.jpg" width="240" height="180" alt="LEDs on" /></a></p>
<p>Covering the photocell&#8212;red LED dims:<br />
<a href="http://www.flickr.com/photos/indiamos/2867518142/" title="Covering the photo cell by indiamos, on Flickr"><img src="http://farm4.static.flickr.com/3099/2867518142_a64a576f70_m.jpg" width="240" height="180" alt="Covering the photo cell" /></a></p>
<p>Nice nail polish, huh.</p>
<p>Holding the thermistor&#8212;green LED dims:<br />
<a href="http://www.flickr.com/photos/indiamos/2867518330/" title="Heating the thermistor by indiamos, on Flickr"><img src="http://farm4.static.flickr.com/3295/2867518330_61d915394c_m.jpg" width="240" height="180" alt="Heating the thermistor" /></a></p>
<p>Do I understand <em>why</em> this worked? Absolutely not. But it worked! Woot!</p>
]]></content:encoded>
			<wfw:commentRss>http://itp.nyu.edu/~ia303/thunk/2008/09/18/analog-in/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PhysComp lab, week 1: Digital in/out</title>
		<link>http://itp.nyu.edu/~ia303/thunk/2008/09/11/digital-inout/</link>
		<comments>http://itp.nyu.edu/~ia303/thunk/2008/09/11/digital-inout/#comments</comments>
		<pubDate>Thu, 11 Sep 2008 12:56:18 +0000</pubDate>
		<dc:creator>India</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[PhysComp]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[homework]]></category>
		<category><![CDATA[lab]]></category>

		<guid isPermaLink="false">http://itp.nyu.edu/blogs/ia303/2008/09/11/digital-inout/</guid>
		<description><![CDATA[First homework for Physical Computing: Digital In Out.

11:15: I forgot how hard you have to pull to strip the insulation off the wire (or is it just me?).
11:30: Wow, I totally remember that smell of hot soldering iron from my childhood. Nevertheless, I am the worst solderer ever.

11:45: Yes, worst solderer ever. Not being able [...]]]></description>
			<content:encoded><![CDATA[<p>First homework for <a href="http://itp.nyu.edu/physcomp/Main/HomePage">Physical Computing</a>: <a href="http://itp.nyu.edu/physcomp/Labs/DigitalInOut">Digital In Out</a>.</p>
<p><a href="http://www.flickr.com/photos/indiamos/2847496653/" title="Supplies for PhysComp homework by indiamos, on Flickr"><img src="http://farm4.static.flickr.com/3108/2847496653_e747625288_m.jpg" width="240" height="180" alt="Supplies for PhysComp homework" /></a></p>
<p><strong>11:15</strong>: I forgot how hard you have to pull to strip the insulation off the wire (or is it just me?).</p>
<p><strong>11:30</strong>: Wow, I totally remember that smell of hot soldering iron from my childhood. Nevertheless, I am the worst solderer ever.<span id="more-7"></span></p>
<p><a href="http://www.flickr.com/photos/indiamos/2847558027/" title="Switch by indiamos, on Flickr"><img src="http://farm4.static.flickr.com/3122/2847558027_782cf5d949_m.jpg" width="240" height="180" alt="Switch" alt="Wires badly soldered onto a switch" /></a></p>
<p><strong>11:45</strong>: Yes, worst solderer ever. Not being able to see anything close up anymore doesn&#8217;t help, either; obviously, I should have gone to ITP while I was still in my twenties and only half-blind.</p>
<p><strong>11:50</strong>: Oh, yeah&#8212;now I remember how to use wire strippers. Rotate.</p>
<p><a href="http://www.flickr.com/photos/indiamos/2847498079/" title="Arduino and Breadboard by indiamos, on Flickr"><img src="http://farm4.static.flickr.com/3191/2847498079_4ba91f9e5c.jpg" width="500" height="248" alt="Arduino and Breadboard" /></a></p>
<p><strong>12:15</strong>: Looking up resistor values. Did I miss some introductory class where we were supposed to learn all this shit? Honestly, if I hadn&#8217;t spent weekend afternoons sorting resistors for my dad when I was in grade school, I think I&#8217;d be completely lost right now. Setting up a straightforward circuit on a breadboard should not be taking this long.</p>
<p><a href="http://www.flickr.com/photos/indiamos/2847572607/" title="Resistors by indiamos, on Flickr"><img src="http://farm4.static.flickr.com/3231/2847572607_df7efb9416.jpg" width="425" height="318" alt="Two kinds of resistors" /></a></p>
<h3>Resistor Values</h3>
<p>Cheat cheet: <a href="http://www.iguanalabs.com/resistors.htm">http://www.iguanalabs.com/resistors.htm</a></p>
<p>10 x brown black black gold = 10</p>
<p>10 x brown black brown gold = 100</p>
<p>10 x red red brown gold = 220</p>
<p>10 x brown black red gold = 1,000</p>
<p>10 x brown black orange gold = 10,000</p>
<p>5 x orange black orange gold = 30,000</p>
<p>5 x brown black yellow gold = 100,000</p>
<p><strong>12:50</strong>: Done sorting resistors, distributing into parts box, drawing and inserting labels.</p>
<p><a href="http://www.flickr.com/photos/indiamos/2847507943/" title="Parts case with resistor labels by indiamos, on Flickr"><img src="http://farm4.static.flickr.com/3217/2847507943_6bf44ee10f.jpg" width="500" height="375" alt="Parts case with resistor labels" /></a></p>
<p><strong>1:15</strong>: Finally, my circuit looks like the photo on the website (well, except for the googly eyes). Woot!</p>
<p><a href="http://www.flickr.com/photos/indiamos/2848338964/" title="Artificial intelligence? by indiamos, on Flickr"><img src="http://farm4.static.flickr.com/3216/2848338964_211bd92097.jpg" width="500" height="333" alt="Artificial intelligence?" /></a></p>
<p>Does it <em>do</em> anything, though?</p>
<p><strong>1:25</strong>: Aaargh! The answer to that question is, <em>No.</em></p>
<blockquote><p>Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.</p>
<p>Binary sketch size: 1126 bytes (of a 14336 byte maximum)</p>
<p>avrdude: stk500_recv(): programmer is not responding<br />
avrdude: stk500_recv(): programmer is not responding</p></blockquote>
<p><strong>1:28</strong>: Hmm. It uploads fine when nothing is connected to the board.</p>
<p><strong>1:30</strong>: Okay, the red LED lights up when I hold down the switch. The green LED doesn&#8217;t do anything, though.</p>
<p><strong>1:35</strong>: <a href="http://www.arduino.cc/en/Guide/Troubleshooting#upload">Troubleshooting</a>. Tried swapping the red and green LEDs: now nothing works. Replaced the green LED with a yellow one: nothing. Re-uploaded the program to the board (which worked just fine this time): nothing. Shite.</p>
<p>Unplugged everything except the USB cable, hit reset, re-uploaded program: error message. Reset, tried uploading again: worked. Plugged breadboard back in: nothing happening.</p>
<p>Hit reset, re-uploaded program: error message.<br />
No reset, re-uploaded program: error message.<br />
Reset, re-uploaded program: upload okay, but no lights.<br />
Jiggled all the connections. Nothing.<br />
Unplugged &amp; replugged USB cable, reset, re-upload: nothing.</p>
<p>AAAAARRRRGGGHHH!!!! I give up.</p>
<p>Reversed the legs of the yellow LED: lit up. Hmm. Reversed legs of red LED: lit up. Now both are lit. When I hold down the switch, both turn off.</p>
<p>Reset, re-upload: error, both lights on.<br />
Reset, re-upload: okay, both lights on.</p>
<p>Changed code to</p>
<blockquote><p>  if (switchState == 1) {<br />
    // if the switch is closed:<br />
    digitalWrite(yellowLedPin, HIGH);    // turn on the yellow LED<br />
    digitalWrite(redLedPin, HIGH);       // turn off the red LED<br />
  }<br />
  else {<br />
    // if the switch is open:<br />
    digitalWrite(yellowLedPin, LOW);   // turn off the yellow LED<br />
    digitalWrite(redLedPin, LOW);     // turn on the red LED</p></blockquote>
<p>    Reset, re-upload: okay, lights off. Pressing switch turns both on.</p>
<p>. . .</p>
<p>YAAAAYY!! In switching the LEDs around, at some point I got one leg into the wrong row. Everything now works exactly as intended! Aaaand . . . it&#8217;s 2 a.m. Bummer. So much for Part II of this week&#8217;s homework: making a combination lock using a LEGO phone.</p>
<p>So.</p>
<p>I don&#8217;t feel like I had any idea what I was doing with this assignment, besides trying to copy <a href="http://itp.nyu.edu/physcomp/uploads/arduino_switch_leds.jpg">the photo</a> exactly. I didn&#8217;t refer to <a href="http://itp.nyu.edu/physcomp/uploads/digital_io.png">the diagram</a> much, because I don&#8217;t really remember <em>from high school</em> how to read an electrical diagram. All in all, I felt pretty uninformed. It would have helped to be doing this in the lab at school, surrounded by other cursing, frustrated people, but I would have had to bend space and time rather drastically in order to be able to work there. Other inhabitants of the universe might have thereby been inconvenienced.</p>
]]></content:encoded>
			<wfw:commentRss>http://itp.nyu.edu/~ia303/thunk/2008/09/11/digital-inout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
