<?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>ITPlay &#187; Physical Computing</title>
	<atom:link href="http://steveaquillano.com/category/itp/physical-computing/feed/" rel="self" type="application/rss+xml" />
	<link>http://steveaquillano.com</link>
	<description>Work can be fun. Is it still work?</description>
	<lastBuildDate>Tue, 09 Mar 2010 15:37:10 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PhysComp Final Sketchbook</title>
		<link>http://steveaquillano.com/2009/11/physcomp-final-sketchbook/</link>
		<comments>http://steveaquillano.com/2009/11/physcomp-final-sketchbook/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 07:25:07 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[ITP]]></category>
		<category><![CDATA[Physical Computing]]></category>

		<guid isPermaLink="false">http://steveaquillano.com/blog/?p=214</guid>
		<description><![CDATA[To chronicle ongoing efforts on my physical computing final I&#8217;ve decided to make a dedicated page.
]]></description>
			<content:encoded><![CDATA[<p>To chronicle ongoing efforts on my physical computing final I&#8217;ve decided to make a <a  href="http://steveaquillano.com/blog/physcomp-final-sketchbook/">dedicated page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://steveaquillano.com/2009/11/physcomp-final-sketchbook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Graphing Analog Sensors</title>
		<link>http://steveaquillano.com/2009/10/graphing-analog-sensors/</link>
		<comments>http://steveaquillano.com/2009/10/graphing-analog-sensors/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 14:46:51 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[ITP]]></category>
		<category><![CDATA[Physical Computing]]></category>
		<category><![CDATA[arduino]]></category>

		<guid isPermaLink="false">http://steveaquillano.com/blog/?p=145</guid>
		<description><![CDATA[I am still a little bit confused about the proper code to use  when you want Arduino to send ASCII vs. binary as well as when I want Processing to read ASCII vs. binary. The Arduino Serial.print library reference has become my best friend. This is a very useful program to keep around to [...]]]></description>
			<content:encoded><![CDATA[<p>I am still a little bit confused about the proper code to use  when you want Arduino to send ASCII vs. binary as well as when I want Processing to read ASCII vs. binary. The <a href="file:///Applications/Arduino.app/Contents/Resources/Java/reference/Serial_Print.html">Arduino Serial.print library reference</a> has become my best friend. This is a very useful program to keep around to test future analog inputs and understand the mapping of their actions to the analog values they produce.</p>
<p><a  href="http://steveaquillano.com/blog/wp-content/uploads/2009/10/graphAnalogSensor.png" class="thickbox no_icon" rel="gallery-145" title="graphAnalogSensor"><img src="http://steveaquillano.com/blog/wp-content/uploads/2009/10/graphAnalogSensor.png" alt="graphAnalogSensor" title="graphAnalogSensor" width="480" height="402" class="aligncenter size-full wp-image-146" /></a></p>
<p><strong>Arduino Code:</strong><br />
<code><br />
int analogPin = 0;<br />
int analogValue = 0;</p>
<p>void setup()<br />
{<br />
  // start serial port at 9600 bps:<br />
  Serial.begin(9600);<br />
}</p>
<p>void loop()<br />
{<br />
  // read analog input, divide by 4 to make the range 0-255:<br />
  analogValue = analogRead(analogPin);<br />
  //analogValue = analogValue / 4;<br />
  Serial.print(analogValue,BYTE);<br />
  // pause for 10 milliseconds:<br />
  delay(10);<br />
}</p>
<p><strong>Processing Code:</strong><br />
import processing.serial.*;</p>
<p>Serial myPort;  // The serial port<br />
int graphXPos = 1;  // The horizontal position of the graph</p>
<p>void setup() {<br />
  size(400,300);  // Window size</p>
<p>  // List all the available serial ports<br />
  println(Serial.list());</p>
<p>  myPort = new Serial(this,Serial.list()[0],9600); // Pick serial port</p>
<p>  background(48,31,65);<br />
}</p>
<p>void draw() {<br />
  // Nothing happens in draw. It all happens in SerialEvent()<br />
}</p>
<p>void serialEvent(Serial myPort) {<br />
  // Get the byte<br />
  int inByte = myPort.read();<br />
  // Print it<br />
  //println(inByte);<br />
  // Set the drawing color<br />
  stroke(123,128,158);<br />
  // Draw the line<br />
  line(graphXPos,height,graphXPos,height-inByte);<br />
  // At the edge of the screen, go back to the beginning<br />
  if(graphXPos >= width) {<br />
    graphXPos = 0;<br />
    // Clear the screen<br />
    background(48,31,65);<br />
  }<br />
  else {<br />
    // Increment the horizontal position for the next reading<br />
    graphXPos++;<br />
  }<br />
}<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://steveaquillano.com/2009/10/graphing-analog-sensors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fun with Tone Output</title>
		<link>http://steveaquillano.com/2009/10/fun-with-tone-output/</link>
		<comments>http://steveaquillano.com/2009/10/fun-with-tone-output/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 06:57:45 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[ITP]]></category>
		<category><![CDATA[Physical Computing]]></category>
		<category><![CDATA[arduino]]></category>

		<guid isPermaLink="false">http://steveaquillano.com/blog/?p=142</guid>
		<description><![CDATA[
Arduino Code:

/*
   Theremin
 Plays tones based on a sensor reading
 uses Tone library by Brett Hagman

http://code.google.com/p/arduino-tone/

 circuit:
 * photoresistor from +5V to analog in 0
 * photoresistor from analog pin 0 to ground
 * 8-ohm speaker on digital pin 8
 created 10 Sep 2009
 by Tom Igoe
 */
#include 
Tone noiseMaker;    [...]]]></description>
			<content:encoded><![CDATA[<p><object width="549" height="302"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=7212885&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=7212885&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="549" height="302"></embed></object></p>
<p>Arduino Code:<br />
<code><br />
/*<br />
   Theremin</p>
<p> Plays tones based on a sensor reading<br />
 uses Tone library by Brett Hagman<br />

http://code.google.com/p/arduino-tone/</p>

<p> circuit:<br />
 * photoresistor from +5V to analog in 0<br />
 * photoresistor from analog pin 0 to ground<br />
 * 8-ohm speaker on digital pin 8</p>
<p> created 10 Sep 2009<br />
 by Tom Igoe<br />
 */</p>
<p>#include <Tone.h><br />
Tone noiseMaker;    // instance of the tone library</p>
<p>void setup() {<br />
  // start the music:<br />
  noiseMaker.begin(8);<br />
}</p>
<p>void loop() {<br />
  // get a sensor reading:<br />
  int sensorReading = analogRead(0);<br />
  // map the results from the sensor reading's range<br />
  // to the desired pitch range:<br />
  int pitch = map(sensorReading, 50, 800, 100, 1000);<br />
  // change the pitch:<br />
  noiseMaker.play(pitch);<br />
}<br />
</code></p>
<p>In this lab, the diagram shows the analog input as two photocells wired in series. I&#8217;m not sure I understand the analog readings produced as a result of this. For example, when both photocells were fully exposed to light the reading was about 200. When the right photocell was covered, the value jumped to 600-800. If only the left photocell was covered, it lowered the reading to about 50. If both were covered, the value leveled out around the same 200 as when they were both fully exposed. I&#8217;m not sure I understand the circuit and why these variable resisters were producing these values.</p>
]]></content:encoded>
			<wfw:commentRss>http://steveaquillano.com/2009/10/fun-with-tone-output/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MTA Subway Ticket Machine</title>
		<link>http://steveaquillano.com/2009/10/mta-subway-ticket-machine/</link>
		<comments>http://steveaquillano.com/2009/10/mta-subway-ticket-machine/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 13:52:15 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[ITP]]></category>
		<category><![CDATA[Physical Computing]]></category>
		<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://steveaquillano.com/blog/?p=136</guid>
		<description><![CDATA[Assumptions:
- Press on-screen &#8220;Start&#8221; button to begin
- Follow on-screen instructions from this point forward
- Choose to refill or get new metrocard
- Choose fare type
- Choose payment method
- Insert payment method
- Select if receipt is desired
- Retrieve ticket and receipt
In the TYPICAL CONTEXT the user finds him- or herself in is one that causes ANXIETY. Usually [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Assumptions:</strong></p>
<p>- Press on-screen &#8220;Start&#8221; button to begin<br />
- Follow on-screen instructions from this point forward<br />
- Choose to refill or get new metrocard<br />
- Choose fare type<br />
- Choose payment method<br />
- Insert payment method<br />
- Select if receipt is desired<br />
- Retrieve ticket and receipt</p>
<p>In the TYPICAL CONTEXT the user finds him- or herself in is one that causes ANXIETY. Usually the user-to-be can expect to be in a queue waiting to use the machine and get their metrocard. If they aren&#8217;t already experiencing anxiety (maybe running late and don&#8217;t have time to wait in line), once it is their turn anxiety really sets in. Anxiety results from the need to be quick to get a metrocard before those waiting behind you become impatient.</p>
<p><strong>Observations:</strong><br />
*Note observations took place on a weekday during morning rush hour.</p>
<p>On average each user took approximately 1 minute to complete their transaction and receive their metrocard. The time of observation suggests that for the majority of people observed, this is not their first time using the machine and have become accustomed to its user interface.</p>
<p>After realizing the screen was a touchscreen, the user interface does a pretty good job of prompting the user for their next action. For those not sure what type of metrocard they want, this is the first point of hesitation in which a decision has to be made. Afterward when the user chooses a payment option, they quickly survey the machine to see where the machine accepts their credit card or cash. The many slots for credit cards, cash, receipts and tickets has a tendency to confuse. Finally, the metrocard and receipt (if desired) is dropped into the lower compartment for retrieval (which some users cannot find).</p>
<p>*Had I observed this public interactive technology on a weekend or at a tourist-heavy station, my findings most likely would&#8217;ve been more dramatic. I doubt it was the first time using the machine for anyone I observed on this particular morning. In short, I think everyone would experience more difficulty using this machine the very first time. The user learns from their first experience and knows what to expect next time.</p>
<p>Another interesting interface design choice was to use the touch screen for all user input, except typing the zip code associated with the user&#8217;s credit card. For this input, the user has to leave the touchscreen and use a keypad found elsewhere on the machine.</p>
<p>UPDATE: It&#8217;s been suggested that using the physical keypad for zipcode entry is most likely a security measure.</p>
]]></content:encoded>
			<wfw:commentRss>http://steveaquillano.com/2009/10/mta-subway-ticket-machine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Analog Out: Servo Motor Control</title>
		<link>http://steveaquillano.com/2009/10/analog-out-servo-motor-control/</link>
		<comments>http://steveaquillano.com/2009/10/analog-out-servo-motor-control/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 04:25:38 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[ITP]]></category>
		<category><![CDATA[Physical Computing]]></category>
		<category><![CDATA[arduino]]></category>

		<guid isPermaLink="false">http://steveaquillano.com/blog/?p=131</guid>
		<description><![CDATA[


]]></description>
			<content:encoded><![CDATA[<p><object width="551" height="303"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=7156052&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=7156052&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="551" height="303"></embed></object></p>
<p><object width="551" height="303"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=7155877&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=7155877&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="551" height="303"></embed></object></p>
<p><object width="551" height="303"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=7155953&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=7155953&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="551" height="303"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://steveaquillano.com/2009/10/analog-out-servo-motor-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Plant Watering Alert System</title>
		<link>http://steveaquillano.com/2009/10/plant-watering-alert-system/</link>
		<comments>http://steveaquillano.com/2009/10/plant-watering-alert-system/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 04:04:18 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[ITP]]></category>
		<category><![CDATA[Physical Computing]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[sensor]]></category>

		<guid isPermaLink="false">http://steveaquillano.com/blog/?p=98</guid>
		<description><![CDATA[

The alert system functions by illuminating the green LED while the plant is properly watered and switches the red LED on when the plant is in need of watering (or dry). Also, when the soil is dry and the plant is watered, the system will turn the red LED off and the green LED on.
A [...]]]></description>
			<content:encoded><![CDATA[<p><object width="551" height="303"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=7105647&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=7105647&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="551" height="303"></embed></object></p>
<div id="attachment_128" class="wp-caption aligncenter" style="width: 347px"><a  href="http://steveaquillano.com/blog/wp-content/uploads/2009/10/soilSensor.png" class="thickbox no_icon" rel="gallery-98" title="Soil Sensor"><img src="http://steveaquillano.com/blog/wp-content/uploads/2009/10/soilSensor.png" alt="Soil Sensor" title="soilSensor" width="337" height="188" class="size-full wp-image-128" /></a><p class="wp-caption-text">Homemade Soil Humidity Sensor</p></div>
<div id="attachment_122" class="wp-caption alignleft" style="width: 218px"><a  href="http://steveaquillano.com/blog/wp-content/uploads/2009/10/soilSensorDry.png" class="thickbox no_icon" rel="gallery-98" title="Sensor reading when dry"><img src="http://steveaquillano.com/blog/wp-content/uploads/2009/10/soilSensorDry.png" alt="Sensor reading when dry" title="soilSensorDry" width="208" height="387" class="size-full wp-image-122" /></a><p class="wp-caption-text">Sensor reading when dry</p></div>
<div id="attachment_123" class="wp-caption alignleft" style="width: 218px"><a  href="http://steveaquillano.com/blog/wp-content/uploads/2009/10/soilSensorWet.png" class="thickbox no_icon" rel="gallery-98" title="Sensor reading when wet"><img src="http://steveaquillano.com/blog/wp-content/uploads/2009/10/soilSensorWet.png" alt="Sensor reading when wet" title="soilSensorWet" width="208" height="387" class="size-full wp-image-123" /></a><p class="wp-caption-text">Sensor reading when wet</p></div>
<p style="clear:both">
<p>The alert system functions by illuminating the green LED while the plant is properly watered and switches the red LED on when the plant is in need of watering (or dry). Also, when the soil is dry and the plant is watered, the system will turn the red LED off and the green LED on.</p>
<p>A small improvement to this system would be to have the green LED dim proportionally as the soil becomes more and more dry, then the red LED would ultimately turn on when the soil is completely dry.</p>
<p>A couple long-term improvements would be to (1) devise an automated watering system or (2) have the plant twitter or sms the owner&#8217;s phone to remind him/her that it needs to be watered.</p>
]]></content:encoded>
			<wfw:commentRss>http://steveaquillano.com/2009/10/plant-watering-alert-system/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Electronics Lab</title>
		<link>http://steveaquillano.com/2009/10/electronics-lab/</link>
		<comments>http://steveaquillano.com/2009/10/electronics-lab/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 14:39:56 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[ITP]]></category>
		<category><![CDATA[Physical Computing]]></category>

		<guid isPermaLink="false">http://steveaquillano.com/blog/?p=107</guid>
		<description><![CDATA[
I successfully connected a DC power source using an AC-to-DC power adapter and a voltage regulator. Then I experimented with the multimeter to measure both amperage and volts through individual components and full circuits. As well as how voltage and amperage differs when components are in a series vs in parallel.
]]></description>
			<content:encoded><![CDATA[<p><a  href="http://steveaquillano.com/blog/wp-content/uploads/2009/10/ac-dc-breadboard.jpg" class="thickbox no_icon" rel="gallery-107" title="ac-dc-breadboard"><img src="http://steveaquillano.com/blog/wp-content/uploads/2009/10/ac-dc-breadboard.jpg" alt="ac-dc-breadboard" title="ac-dc-breadboard" width="550" height="250" class="alignnone size-full wp-image-133" /></a></p>
<p>I successfully connected a DC power source using an AC-to-DC power adapter and a voltage regulator. Then I experimented with the multimeter to measure both amperage and volts through individual components and full circuits. As well as how voltage and amperage differs when components are in a series vs in parallel.</p>
]]></content:encoded>
			<wfw:commentRss>http://steveaquillano.com/2009/10/electronics-lab/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fantasy Device</title>
		<link>http://steveaquillano.com/2009/10/fantasy-device/</link>
		<comments>http://steveaquillano.com/2009/10/fantasy-device/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 17:51:47 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[ITP]]></category>
		<category><![CDATA[Physical Computing]]></category>

		<guid isPermaLink="false">http://steveaquillano.com/blog/?p=92</guid>
		<description><![CDATA[
Language Learning Glasses
I&#8217;m simultaneously fascinated and frustrated with the rate at which a child can learn new languages. As we grow older, our ability to easily learn other languages dramatically decreases. Rosetta Stone has developed a system where you learn a foreign language based on word/picture associations. The idea is that when you see the [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://steveaquillano.com/blog/wp-content/uploads/2009/10/glassesSide.png" alt="glassesSide" title="glassesSide" width="478" height="160" class="alignleft size-full wp-image-94" /></p>
<p>Language Learning Glasses</p>
<p>I&#8217;m simultaneously fascinated and frustrated with the rate at which a child can learn new languages. As we grow older, our ability to easily learn other languages dramatically decreases. Rosetta Stone has developed a system where you learn a foreign language based on word/picture associations. The idea is that when you see the spanish word &#8220;manzana&#8221; you immediately think of the object, not the english spelling &#8220;apple.&#8221;</p>
<p>These fantasized language learning glasses would couple a heads-up-display (HUD) with direction speakers to create an augmented reality. For example, as you walk through the grocery store, the glasses recognize objects, show the associated word in your language of choice on the HUD, and a voice pronounces it for you. It is Rosetta Stone 24&#215;7.</p>
<p><img src="http://steveaquillano.com/blog/wp-content/uploads/2009/10/glassesTop.png" alt="glassesTop" title="glassesTop" width="528" height="350" class="alignleft size-full wp-image-95" /></p>
]]></content:encoded>
			<wfw:commentRss>http://steveaquillano.com/2009/10/fantasy-device/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Physical Computing &#8211; Week 2 Lab</title>
		<link>http://steveaquillano.com/2009/09/physical-computing-week-2-lab/</link>
		<comments>http://steveaquillano.com/2009/09/physical-computing-week-2-lab/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 13:17:21 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[ITP]]></category>
		<category><![CDATA[Physical Computing]]></category>
		<category><![CDATA[arduino]]></category>

		<guid isPermaLink="false">http://steveaquillano.com/blog/?p=14</guid>
		<description><![CDATA[This week we studied analog inputs. In lab, I created a circuit using the Arduino to translate analog reads from a potentiometer (switch) into the brightness of an LED.






int potPin = 0; // Analog input pin that the potentiometer is attached to
int potValue = 0; // Value read from the pot
int led = 9; // [...]]]></description>
			<content:encoded><![CDATA[<p>This week we studied analog inputs. In lab, I created a circuit using the Arduino to translate analog reads from a potentiometer (switch) into the brightness of an LED.</p>
<p><img src="http://steveaquillano.com/blog/wp-content/uploads/2009/09/pcomp-wk2-1of2.JPG" alt="pcomp-wk2-1of2" title="pcomp-wk2-1of2" width="475" height="356" class="aligncenter size-full wp-image-20" /></p>
<p><img src="http://steveaquillano.com/blog/wp-content/uploads/2009/09/pcomp-wk2-2of2.JPG" alt="pcomp-wk2-2of2" title="pcomp-wk2-2of2" width="475" height="356" class="aligncenter size-full wp-image-15" /></p>
<p>
<img src="http://steveaquillano.com/blog/wp-content/uploads/2009/09/pcompwk2-1024.png" alt="pcompwk2-1024" title="pcompwk2-1024" width="250" height="280" class="alignleft size-full wp-image-17" /><img src="http://steveaquillano.com/blog/wp-content/uploads/2009/09/pcompwk2-512.png" alt="pcompwk2-512" title="pcompwk2-512" width="250" height="280" class="alignleft size-full wp-image-18" /><img src="http://steveaquillano.com/blog/wp-content/uploads/2009/09/pcompwk2-0.png" alt="pcompwk2-0" title="pcompwk2-0" width="250" height="280" />
</p>
<p><code></p>
<p>int potPin = 0; // Analog input pin that the potentiometer is attached to<br />
int potValue = 0; // Value read from the pot<br />
int led = 9; // PWM pin that the LED is on. n.b. PWM 0 is on digital pin 9</p>
<p>void setup() {<br />
  // Initialize serial communications at 9600 bps<br />
  Serial.begin(9600);<br />
}</p>
<p>void loop() {<br />
  potValue = analogRead(potPin); // read teh pot value<br />
  analogWrite(led, potValue/4); // PWM the LED with the pot value (divided by 4 to fit in a byte<br />
  Serial.println(potValue); // Print the pot value back to the debugger pane<br />
  delay(10);<br />
}<br />
</code></p>
<p><object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=6717293&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=6717293&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object>
<p><a  href="http://vimeo.com/6717293">PComp-Wk2-Lab</a> from <a  href="http://vimeo.com/user2310172">Steve Aquillano</a> on <a  href="http://vimeo.com">Vimeo</a>.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://steveaquillano.com/2009/09/physical-computing-week-2-lab/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Physical Computing &#8211; Week 1</title>
		<link>http://steveaquillano.com/2009/09/physical-computing-week-1/</link>
		<comments>http://steveaquillano.com/2009/09/physical-computing-week-1/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 12:20:55 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[ITP]]></category>
		<category><![CDATA[Physical Computing]]></category>
		<category><![CDATA[arduino]]></category>

		<guid isPermaLink="false">http://steveaquillano.com/blog/?p=3</guid>
		<description><![CDATA[The purpose of our first assignment in physical computing was to become familiar with circuits, the arduino microcontroller and building circuits on a breadboard.
To begin I translated the circuit to the breadboard. Afterward I compiled and uploaded the program to the arduino microcontroller.
End result: When the switch is off, the red led is on. When [...]]]></description>
			<content:encoded><![CDATA[<p>The purpose of our first assignment in physical computing was to become familiar with circuits, the arduino microcontroller and building circuits on a breadboard.</p>
<p>To begin I translated the circuit to the breadboard. Afterward I compiled and uploaded the program to the arduino microcontroller.</p>
<p>End result: When the switch is off, the red led is on. When the circuit is switched on, the red led turns off and the yellow led turns on.</p>
<div id="attachment_5" class="wp-caption aligncenter" style="width: 485px"><img src="http://steveaquillano.com/blog/wp-content/uploads/2009/09/pcomp-wk1-1of2.JPG" alt="Switch Off" title="pcomp-wk1-1of2" width="475" height="356" class="size-full wp-image-5" /><p class="wp-caption-text">Switch Off</p></div>
<div id="attachment_6" class="wp-caption aligncenter" style="width: 485px"><img src="http://steveaquillano.com/blog/wp-content/uploads/2009/09/pcomp-wk1-2of2.JPG" alt="Switch On" title="pcomp-wk1-2of2" width="475" height="356" class="size-full wp-image-6" /><p class="wp-caption-text">Switch On</p></div>
<p>// declare variables:<br />
 int switchPin = 2;      //  digital input pin for a switch<br />
 int yellowLedPin = 3;   //  digital output pin for an LED<br />
 int redLedPin = 4;      //  digital output pin for an LED<br />
 int switchState = 0;    // the state of the switch</p>
<p> void setup() {<br />
   pinMode(switchPin, INPUT);       // set the switch pin to be an input<br />
   pinMode(yellowLedPin, OUTPUT);   // set the yellow LED pin to be an output<br />
   pinMode(redLedPin, OUTPUT);      // set the red LED pin to be an output<br />
 }</p>
<p> void loop() {<br />
   // read the switch input:<br />
   switchState = digitalRead(switchPin);</p>
<p>   if (switchState == 1) {<br />
     // if the switch is closed:<br />
     digitalWrite(yellowLedPin, HIGH);    // turn on the yellow LED<br />
     digitalWrite(redLedPin, LOW);       // 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, HIGH);     // turn on the red LED<br />
   }<br />
 }</p>
<p><object width="475" height="375"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=6606405&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=6606405&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object>
<p><a  href="http://vimeo.com/6606405">PComp-Wk1-Video</a> from <a  href="http://vimeo.com/user2310172">Steve Aquillano</a> on <a  href="http://vimeo.com">Vimeo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://steveaquillano.com/2009/09/physical-computing-week-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
