<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.roberttwomey.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mchoy</id>
		<title>Robert-Depot - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.roberttwomey.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mchoy"/>
		<link rel="alternate" type="text/html" href="http://wiki.roberttwomey.com/Special:Contributions/Mchoy"/>
		<updated>2026-06-09T14:03:17Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.27.1</generator>

	<entry>
		<id>http://wiki.roberttwomey.com/index.php?title=Classes/2009/VIS147B&amp;diff=650</id>
		<title>Classes/2009/VIS147B</title>
		<link rel="alternate" type="text/html" href="http://wiki.roberttwomey.com/index.php?title=Classes/2009/VIS147B&amp;diff=650"/>
				<updated>2009-05-02T19:31:24Z</updated>
		
		<summary type="html">&lt;p&gt;Mchoy: /* Students Pages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Spring 2009 - Vis 147B&lt;br /&gt;
&lt;br /&gt;
Robert Twomey&lt;br /&gt;
&lt;br /&gt;
rtwomey@ucsd.edu&lt;br /&gt;
&lt;br /&gt;
My work: http://roberttwomey.com&lt;br /&gt;
&lt;br /&gt;
I also work at the Experimental Game Lab &lt;br /&gt;
(http://www.experimentalgamelab.net/)&lt;br /&gt;
&lt;br /&gt;
Office Hours: Thursdays 4-5pm, electronics lab (VAF 106)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Chris Head&lt;br /&gt;
&lt;br /&gt;
[http://gubbish.org gubbish.org]&lt;br /&gt;
&lt;br /&gt;
chead@ucsd.edu&lt;br /&gt;
&lt;br /&gt;
Office Hours: Email! Atkinson Hall 2503&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Image:freeduino.jpg]] [[Image:Fk_schematic2 L.jpg|400px|thumb]]&lt;br /&gt;
[http://www.atmel.com/dyn/resources/prod_documents/doc8025.pdf datasheet (400+ pages)]&lt;br /&gt;
&lt;br /&gt;
USB powered microprocessor&lt;br /&gt;
&lt;br /&gt;
== Curriculum ==&lt;br /&gt;
=== Week 1 - Intro/Assembly===&lt;br /&gt;
&lt;br /&gt;
* Introduction&lt;br /&gt;
* Assemble your Freeduino: &lt;br /&gt;
** INSTRUCTIONS: http://mcukits.com/2009/03/12/assembling-the-freeduino-board-kit/&lt;br /&gt;
** verify values of resistors and capacitors (see charts in Practical Electronics for Inventors)&lt;br /&gt;
** check polarity (+/-) on capacitors, LEDs&lt;br /&gt;
** care with soldering&lt;br /&gt;
* Download and install Arduino 0015 software: http://www.arduino.cc/en/Main/Software&lt;br /&gt;
* Assignment: Assembled, functioning Freeduino, communicating with computer, able to upload test sketches, before next class.&lt;br /&gt;
* NOTE: We have a newer, beefier processor than the original Arduino.  You need to tell the Arduino software this. &lt;br /&gt;
** (if you had problems uploading, this may have been why)&lt;br /&gt;
**In the Arduino software, under Tools-&amp;gt;Board, select the Duemilanove w/ Atmega 328.&lt;br /&gt;
&lt;br /&gt;
===  Week 2 - Digital input/output ===&lt;br /&gt;
Week 2 Lab: [[basic_digital]]&lt;br /&gt;
&lt;br /&gt;
* USES OF THE ARDUINO ON THE WEB:&lt;br /&gt;
** to make a 3d scanner http://hackedgadgets.com/2009/04/02/3d-arduino-scanner/&lt;br /&gt;
** with 2 servos (to be demonstrated), and an IR range-finder: http://www.acroname.com/robotics/parts/R144-GP2Y0A02YK.html&lt;br /&gt;
* Have you seen anything you like?&lt;br /&gt;
&lt;br /&gt;
=== Week 3 - PWM, Analog Input/Output ===&lt;br /&gt;
* lights, fading&lt;br /&gt;
* sounds, tone generation&lt;br /&gt;
* Basic motor control (DC motors) see week 5&lt;br /&gt;
[[Week 3 Lab]]&lt;br /&gt;
&lt;br /&gt;
=== Week 4 - Interfacing ===&lt;br /&gt;
* Serial Interface&lt;br /&gt;
* Processing, MaxMSP, and many more.&lt;br /&gt;
* Computer -&amp;gt; Arduino&lt;br /&gt;
* Arduino -&amp;gt; Computer&lt;br /&gt;
[[Week 4 Lab]]&lt;br /&gt;
&lt;br /&gt;
=== Week 5 - Catchup / Oscilloscope / Your own projects ===&lt;br /&gt;
* Discuss homework. &lt;br /&gt;
* The Oscilloscope (Ah-ha!)&lt;br /&gt;
* Wikis (take it away Chris) &lt;br /&gt;
* HOMEWORK: Look on-line to find an interesting project someone has made with an Arduino.  Register for this Wiki (instructions below), and post a link to the project you found, along with a short paragraph describing your interest in the project. Places to look for projects &lt;br /&gt;
* http://www.instructables.com/ &lt;br /&gt;
* http://makezine.com/ &lt;br /&gt;
* http://turbulence.org/ &lt;br /&gt;
* http://www.we-make-money-not-art.com/&lt;br /&gt;
* http://www.rhizome.org/&lt;br /&gt;
&lt;br /&gt;
=== Week 6 - Enclosures, Linkages, Framing ===&lt;br /&gt;
* Made in a dorm room...&lt;br /&gt;
* Made in a machine shop...&lt;br /&gt;
* Made in an art studio&lt;br /&gt;
** Tim Hawkinson&lt;br /&gt;
* Where are you?&lt;br /&gt;
* Context&lt;br /&gt;
&lt;br /&gt;
=== Week 7-10 TBD, Towards Final Projects ===&lt;br /&gt;
* Designing a circuit in Eagle CAD&lt;br /&gt;
* Etching your own PCB&lt;br /&gt;
* Advanced interfaces: Zigbee, Bluetooth, Ethernet. &lt;br /&gt;
&lt;br /&gt;
=== Final Project ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Grading == &lt;br /&gt;
* 60% Final Project&lt;br /&gt;
** Proposal&lt;br /&gt;
** Fabrication&lt;br /&gt;
** Documentation&lt;br /&gt;
* 10 % Attendance&lt;br /&gt;
* 30 % Assignments (weekly)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* Good classes at the NYU Interactive Telecommunications Program (ITP):  ITP Physical Computing&lt;br /&gt;
** http://itp.nyu.edu/physcomp/Tutorials/Tutorials&lt;br /&gt;
** http://itp.nyu.edu/physcomp/Parts/ComputerStoreKits&lt;br /&gt;
** http://itp.nyu.edu/physcomp/Intro/HomePage&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
=== Resources ===&lt;br /&gt;
Playground&lt;br /&gt;
[http://www.arduino.cc/playground/ http://www.arduino.cc/playground/]&lt;br /&gt;
&lt;br /&gt;
Interfacing with hardware:&lt;br /&gt;
http://www.arduino.cc/playground/Main/InterfacingWithHardware&lt;br /&gt;
&lt;br /&gt;
Forums:&lt;br /&gt;
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl&lt;br /&gt;
&lt;br /&gt;
=== Main Board ===&lt;br /&gt;
&lt;br /&gt;
Many different options.  All share a common programming environment, common code, and a similar physical layout.   The board we are using does not require an external USB adaptor, which means all we need to do to program (and power) it is to plug it into the computer with a USB cable. &lt;br /&gt;
&lt;br /&gt;
Here are some of the variants:&lt;br /&gt;
&lt;br /&gt;
*Arduino&lt;br /&gt;
** Arduino Duemilanove http://moderndevice.com/diecimila.shtml&lt;br /&gt;
* Freeduinos&lt;br /&gt;
** http://www.freeduino.org/buy.html&lt;br /&gt;
** http://www.hvwtech.com/products_view.asp?ProductID=682&lt;br /&gt;
** http://www.nkcelectronics.com/freeduino-arduino-diecimila-compatible-board-complete-kit.html&lt;br /&gt;
**http://mcukits.com/2009/03/12/assembling-the-freeduino-board-kit/&lt;br /&gt;
* Bare Bones Freeduinos&lt;br /&gt;
** Bare Bones Board http://moderndevice.com/index.shtml&lt;br /&gt;
** Readlly Bare Bones Board http://moderndevice.com/RBBB_revB.shtml&lt;br /&gt;
** require external USB adapter&lt;br /&gt;
* Off-board Serial&lt;br /&gt;
** FTDI breakout board (with DTR reset) http://www.sparkfun.com/commerce/product_info.php?products_id=8772&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[User:Chead/Project Example | How to create a project page]]&lt;br /&gt;
&lt;br /&gt;
== Students Pages ==&lt;br /&gt;
&lt;br /&gt;
[[Robert&amp;#039;s page]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[User:Chead/final_project | Chris&amp;#039;s final project template]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Micha&amp;#039;s page]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[User:Mchoy | Mchoy&amp;#039;s page]]&lt;/div&gt;</summary>
		<author><name>Mchoy</name></author>	</entry>

	<entry>
		<id>http://wiki.roberttwomey.com/index.php?title=User:Mchoy&amp;diff=649</id>
		<title>User:Mchoy</title>
		<link rel="alternate" type="text/html" href="http://wiki.roberttwomey.com/index.php?title=User:Mchoy&amp;diff=649"/>
				<updated>2009-05-02T19:28:05Z</updated>
		
		<summary type="html">&lt;p&gt;Mchoy: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Project Idea&lt;br /&gt;
&lt;br /&gt;
http://www.instructables.com/id/Power-Glove-20th-Anniversary-Edition/&lt;br /&gt;
&lt;br /&gt;
See the clip from &amp;#039;&amp;#039;The Wizard&amp;#039;&amp;#039;.  http://www.techeblog.com/index.php/tech-gadget/the-powerglove-nes-revisited&lt;br /&gt;
&lt;br /&gt;
It&amp;#039;s so bad!&lt;/div&gt;</summary>
		<author><name>Mchoy</name></author>	</entry>

	<entry>
		<id>http://wiki.roberttwomey.com/index.php?title=User:Mchoy&amp;diff=648</id>
		<title>User:Mchoy</title>
		<link rel="alternate" type="text/html" href="http://wiki.roberttwomey.com/index.php?title=User:Mchoy&amp;diff=648"/>
				<updated>2009-05-02T19:27:27Z</updated>
		
		<summary type="html">&lt;p&gt;Mchoy: NES Powerglove!&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://www.instructables.com/id/Power-Glove-20th-Anniversary-Edition/&lt;br /&gt;
&lt;br /&gt;
See the clip from &amp;#039;&amp;#039;The Wizard&amp;#039;&amp;#039;.  http://www.techeblog.com/index.php/tech-gadget/the-powerglove-nes-revisited&lt;br /&gt;
&lt;br /&gt;
It&amp;#039;s so bad!&lt;/div&gt;</summary>
		<author><name>Mchoy</name></author>	</entry>

	<entry>
		<id>http://wiki.roberttwomey.com/index.php?title=Week_4_Lab&amp;diff=600</id>
		<title>Week 4 Lab</title>
		<link rel="alternate" type="text/html" href="http://wiki.roberttwomey.com/index.php?title=Week_4_Lab&amp;diff=600"/>
				<updated>2009-04-21T18:31:58Z</updated>
		
		<summary type="html">&lt;p&gt;Mchoy: /* modifying for rudimentary keyboard control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;from [[Electronic Technologies for Art]]&lt;br /&gt;
&lt;br /&gt;
== Interfacing ==&lt;br /&gt;
*Download and install processing http://processing.org/download&lt;br /&gt;
This is the program we are going to use for our in class work, and for your homework this week. &lt;br /&gt;
To get a sense of what people do with processing, you can look at their exhibition space http://processing.org/exhibition/, or do some google searching.&lt;br /&gt;
We are going to use Processing because it is easy to get started with, quick to make experiments, and it has a similar layout and feel to our Arduino software.&lt;br /&gt;
&lt;br /&gt;
== Serial Basics ==&lt;br /&gt;
Basic text output from the microcontroller is accomplished with &lt;br /&gt;
 Serial.print()&lt;br /&gt;
and&lt;br /&gt;
 Serial.println()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use this to verify values and behavior inside of a program, for debugging, for example:&lt;br /&gt;
&lt;br /&gt;
Displaying values of sensors:  &amp;lt;code&amp;gt;&lt;br /&gt;
 val=analogRead(input_pin);&lt;br /&gt;
 Serial.print(val);&lt;br /&gt;
&amp;lt;/code&amp;gt; (assuming you&amp;#039;ve done the necessary setup).&lt;br /&gt;
&lt;br /&gt;
Checking program flow, communicating the status of things to the user or debugger (you!).&lt;br /&gt;
&lt;br /&gt;
Inside the Arduino software, we will use the &amp;quot;Serial Monitor&amp;quot; to observe what is going on with the serial port.  Here is where you will see data printed with the &amp;lt;code&amp;gt;Serial.print()&amp;lt;/code&amp;gt; command, and you can also send some very simple messages back to the processor with the &amp;quot;Send&amp;quot; button. &lt;br /&gt;
&lt;br /&gt;
*Open the Sketchbook-&amp;gt;Examples-&amp;gt;Communication-&amp;gt;ASCIITable, compile it, and run it on your processor. &lt;br /&gt;
* This program does basic text communication from the processor to your PC, running through all of the characters in the alphabet. &lt;br /&gt;
* Click on the &amp;quot;Serial Monitor&amp;quot; button (to the right of the &amp;quot;Upload to Board&amp;quot; button) in the arduino software.  verify that your processor is communicating with the PC (do you see the letters streaming by?)  This is your processor sending data to the computer. We will use this later.&lt;br /&gt;
&lt;br /&gt;
==  Sending Data from your Arduino to the Computer ==&lt;br /&gt;
For this section you are going to use three potentiometers (or light sensor, or whatever you would like) to drive an application on the computer. &lt;br /&gt;
Examples-&amp;gt;Communication-&amp;gt;VirtualColorMixer&lt;br /&gt;
* Wire up three potentiometers as voltage dividers (like last week), and connect them to Analog_IN pins 0, 1, and 2.&lt;br /&gt;
[[Image:Pot_in.png]] [[Image:Color_mixer_pot_in.jpg|300px]]&lt;br /&gt;
*Compile the Virtual Color Mixer, and upload it to your arduino. &lt;br /&gt;
*In the Serial Monitor, verify that you see R, G, and B values, and they change as you move the potentiometers.&lt;br /&gt;
[[Image:Color_mix_serialout.png|300px]]&lt;br /&gt;
*Create the processing Sketch &amp;quot;arduino_color_mixer&amp;quot;&lt;br /&gt;
*Change the Serial port in the initialization in Processing.  (&amp;lt;code&amp;gt;port = new Serial(this, Serial.list()[2], 9600);&amp;lt;/code&amp;gt; on my computer)&lt;br /&gt;
*Change  the &amp;lt;code&amp;gt;Integer.parseInt(buff);&amp;lt;/code&amp;gt; statements to say &amp;lt;code&amp;gt;rval = Integer.parseInt(buff)/4;&amp;lt;/code&amp;gt;.  This relates to the issue last week with the &amp;lt;code&amp;gt;analogRead()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;analogWrite()&amp;lt;/code&amp;gt;: our Arduino is transmitting a 10bit (0-1023) value captured from the &amp;lt;code&amp;gt;analogRead()&amp;lt;/code&amp;gt;, but the &amp;lt;code&amp;gt;background(rval, gval, bval);&amp;lt;/code&amp;gt; command in Processing wants 8bit (0-255) values for Red, Green, and Blue.  Thus, we need to divide the 10 bit values by 4.&lt;br /&gt;
[[Image:Arduino_color_mixer.png|300px]]&lt;br /&gt;
* Run this program (same as on the Arduino, click the little &amp;quot;Play&amp;quot; button at the upper left).  NOTE: Hold down the reset button on your Arduino while you start the Processing applet.  Release the button once the new window has appeared.  If you do not, the Processing applet will start reading mid-data stream, which will confuse it and crash.  You should see something like the window below: &lt;br /&gt;
[[Image:Color_mix.png]]&lt;br /&gt;
&lt;br /&gt;
* You should be able to change the color of the on-screen square by dialing the knobs back and forth.  This behavior could be anything: you could move images around on the screen according to the knobs, you could trigger media clips, you could fire off e-mails.  Anything you can program on the computer could be triggered by input from your Arduino.  This is the first half of an interactive microprocessor / computer sculpture.&lt;br /&gt;
&lt;br /&gt;
== Sending Data from the Computer to Control your Arduino ==&lt;br /&gt;
===Controlling a physical LED with the computer.===&lt;br /&gt;
* Compile the Examples-&amp;gt;Communication-&amp;gt;Dimmer example, and upload it to your board.  This example sets up communication on the serial port (in the &amp;lt;code&amp;gt;void setup()&amp;lt;/code&amp;gt; function, and then reads values from the &amp;lt;code&amp;gt;Serial&amp;lt;/code&amp;gt; input, and writes them to the &amp;lt;code&amp;gt;ledPin&amp;lt;/code&amp;gt; output. &lt;br /&gt;
* Connect up the TIP120 driver circuit and motor from last week to the &amp;lt;code&amp;gt;ledPin&amp;lt;/code&amp;gt; (pin 9).  You should now be able to control the motor speed via the serial port on your computer... interesting...&lt;br /&gt;
* Click on the Serial Monitor.  Try sending different values to the board.  Type in numbers and press Enter (or click on the &amp;quot;Send&amp;quot; button, either will work). &lt;br /&gt;
** What behavior do you observe? &lt;br /&gt;
** Can you get the motor to speed up or slow down? &lt;br /&gt;
=== modifying for rudimentary keyboard control ===&lt;br /&gt;
As-is, the Dimmer code is not very useful for controlling through the serial terminal like this.  Now we are going to modify it to so that it works a little better.  Our goal is to be able to set the speed of the motor typing the numbers 0-9 on the keyboard.  9 will go fastest (nearly full speed), and 0 will be a dead stop.  &lt;br /&gt;
* Make a new copy of the Dimmer example, and replace the original &amp;lt;code&amp;gt;loop()&amp;lt;/code&amp;gt; code with this new one:&lt;br /&gt;
 void loop()&lt;br /&gt;
 {&lt;br /&gt;
  char val;&lt;br /&gt;
  byte out_speed;&lt;br /&gt;
  // check if data has been sent from the computer&lt;br /&gt;
  if (Serial.available()) {&lt;br /&gt;
    // read the most recent byte (which will be from 0 to 255)&lt;br /&gt;
    val = Serial.read();&lt;br /&gt;
    &lt;br /&gt;
    if((val&amp;gt;=&amp;#039;0&amp;#039;)&amp;amp;&amp;amp;(val&amp;lt;=&amp;#039;9&amp;#039;)) {&lt;br /&gt;
      val=val-&amp;#039;0&amp;#039;; // set value between 0 and 9. &lt;br /&gt;
      out_speed=val*28; // set out_speed between 0 and 252.&lt;br /&gt;
      analogWrite(ledPin, out_speed);&lt;br /&gt;
    } &lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
*What I have done is change the &amp;lt;code&amp;gt;Serial.read()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;analogWrite()&amp;lt;/code&amp;gt; from before.  Now we are reading a &amp;lt;code&amp;gt;char&amp;lt;/code&amp;gt; rather than a &amp;lt;code&amp;gt;byte&amp;lt;/code&amp;gt; from the Serial port, and we are checking whether this character it reads is one of the characters between &amp;#039;0&amp;#039; and &amp;#039;9&amp;#039;: a letter on the keyboard was pressed, it is one of the numbers?  If it is (&amp;lt;code&amp;gt;if((val&amp;gt;=&amp;#039;0&amp;#039;)&amp;amp;&amp;amp;(val&amp;lt;=&amp;#039;9&amp;#039;))&amp;lt;/code&amp;gt;) then we will set the speed of the motor proportionally.&lt;br /&gt;
* Compile and upload this sketch to the board, and try it out.  Start the Serial Monitor again, and try sending the numbers 0-9 on the keyboard, the motor should speed up and slow down appropriately. &lt;br /&gt;
* EXPLANATION: What did we just do?  The problem in our original Dimmer code was that the microcontroller was looking just at the binary value of the data it was receiving, but did not know what key was pressed.  So, when we typed the number 0, which happens to have a binary value of ___ in the ASCII table, it will set the speed to that value, not to 0.  We changed the program so the microcontroller is looking for the specific characters, &amp;#039;0&amp;#039; to &amp;#039;9&amp;#039;, and then doing the appropriate math to set the output to the right speed.&lt;br /&gt;
&lt;br /&gt;
=== controlling your arduino from processing app ===&lt;br /&gt;
Save your modified Dimmer example, and revert back to the original dimmer code.  We are now going to learn how to control the processor from the processing App.  See the commented Processing code hidden at the end of the Dimmer program. &lt;br /&gt;
* In Processing, open a new sketch, and copy this code into it.  Save this sketch as &amp;quot;arduino_test&amp;quot; or something like that. It should look like this:&lt;br /&gt;
[[Image:Arduino_serialtest_processing.png|300px]]&lt;br /&gt;
* Try running this sketch.  When you do, it may give you an error about &amp;quot;COM1&amp;quot; or something of that sort.  You need to tell the program what serial port your arduino is connected to.  When the program runs, you will see a list of Serial ports, you can see mine in the picture above.  On my comnputer, I see that my serial port is the &amp;quot;tty.usbserial-A900acnt&amp;quot;, which is listed as device number 2 ([2]), so I go back into the processing code and change the line that says &amp;lt;code&amp;gt;port = new Serial&amp;lt;/code&amp;gt;... to read &amp;lt;code&amp;gt;port = new Serial(this, Serial.list()[2], 9600);&amp;lt;/code&amp;gt;&lt;br /&gt;
* Now if I run the sketch again, I know that it will be properly communicating with the Arduino.   You will need to modify that line to reflect whichever serial port your arduino is connected to.  &lt;br /&gt;
* Upload the original (unmodified) Dimmer code to your arduino in the arduino software.  Your processor should now be running that code... waiting for input!&lt;br /&gt;
* Run your newly created arduino_test sketch in processing.  You will see a small graphic window (like the one below), as you drag your mouse forwards and backwards across that window, your motor should speed up and slow down.  Allright!!  Now you have a simple graphical interface!&lt;br /&gt;
[[Image:Arduino_serialtest.png]]&lt;br /&gt;
* You can interface the arduino with any other program that can communicate via the serial port.  This could be MaxMSP, Java, C++, OpenFrameworks (http://www.openframeworks.cc/download) or many others.  Here is a complete list: http://www.arduino.cc/playground/Main/InterfacingWithSoftware&lt;br /&gt;
** Also you can communicate via network with one of these serial-to-network proxies: http://www.arduino.cc/playground/Interfacing/SerialNet&lt;br /&gt;
&lt;br /&gt;
== Send data from your sensor to the computer ==&lt;br /&gt;
* Assuming you have a sensor which produces an analog output, hook it up to one of the Analog Inputs on your arduino.  If you do not have a sensor, use the light sensor from last week.  If you are not sure how your sensor works, come over and talk to me and we can try to figure it out. &lt;br /&gt;
* Run a short program to read data from that sensor and send it to the Serial port.  &lt;br /&gt;
** You will need a &amp;lt;code&amp;gt;setup()&amp;lt;/code&amp;gt; block, which initializes the Serial communication &amp;lt;code&amp;gt;Serial.begin(9600);&amp;lt;/code&amp;gt;&lt;br /&gt;
** And in the  main loop of the program (&amp;lt;code&amp;gt;loop()&amp;lt;/code&amp;gt;), you will need to do the &amp;lt;code&amp;gt;analogRead()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Serial.print()&amp;lt;/code&amp;gt; commands from above.&lt;br /&gt;
* See what the output from your Sensor is.  How does it change as you manipulate your sensor? This is what we were getting at last week figuring out the voltage range for our sensors: when we want to use a sensor to make a project sensitive and responsive to the environment, we need to know what voltages correspond to the conditions of interest.  When you start with a new project, this sort of Serial communication is a very valuable tool.&lt;br /&gt;
&lt;br /&gt;
== Homework ==&lt;br /&gt;
With your sensor, build a simple computer/microprocessor project.  Establish communication between the computer and processor, either controlling the device with commands from your computer program, or driving the computer program with information from the processor.  You may use Processing, and adapt one of the simple examples we have seen in class, or you can use any other program you are comfortable with (Flash, MaxMSP, PD), so long as you can demonstrate it to us in class next week.  We will take the first part of class to look at your these mini-projects.  &amp;lt;!-- Also, please register on the wiki and post a short description of your project. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The little program from the first part of the lesson, where your Arduino program outputs the data from your sensor Serially will be useful here.  Now you just need to make a program on the computer to take that data and do something with it.  If you are looking for inspiration, pick a couple of the sketchbook examples in Processing and run a few of them.  You will need to intergrate the Serial data input into one of those examples, or come up with something new.  We can work on this in class today.&lt;br /&gt;
&lt;br /&gt;
== Interesting Side Note: Pachube ==&lt;br /&gt;
http://www.pachube.com/&lt;br /&gt;
a service that enables you to connect, tag and share real time sensor data from objects, devices, buildings and environments around the world. The key aim is to facilitate interaction between remote environments, both physical and virtual.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Extra Info: Interfacing with Other Devices ==&lt;br /&gt;
&lt;br /&gt;
Connecting to various external devices and components: http://www.arduino.cc/playground/Main/ComponentLib&lt;/div&gt;</summary>
		<author><name>Mchoy</name></author>	</entry>

	<entry>
		<id>http://wiki.roberttwomey.com/index.php?title=Week_4_Lab&amp;diff=599</id>
		<title>Week 4 Lab</title>
		<link rel="alternate" type="text/html" href="http://wiki.roberttwomey.com/index.php?title=Week_4_Lab&amp;diff=599"/>
				<updated>2009-04-21T18:22:36Z</updated>
		
		<summary type="html">&lt;p&gt;Mchoy: /* modifying for rudimentary keyboard control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;from [[Electronic Technologies for Art]]&lt;br /&gt;
&lt;br /&gt;
== Interfacing ==&lt;br /&gt;
*Download and install processing http://processing.org/download&lt;br /&gt;
This is the program we are going to use for our in class work, and for your homework this week. &lt;br /&gt;
To get a sense of what people do with processing, you can look at their exhibition space http://processing.org/exhibition/, or do some google searching.&lt;br /&gt;
We are going to use Processing because it is easy to get started with, quick to make experiments, and it has a similar layout and feel to our Arduino software.&lt;br /&gt;
&lt;br /&gt;
== Serial Basics ==&lt;br /&gt;
Basic text output from the microcontroller is accomplished with &lt;br /&gt;
 Serial.print()&lt;br /&gt;
and&lt;br /&gt;
 Serial.println()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use this to verify values and behavior inside of a program, for debugging, for example:&lt;br /&gt;
&lt;br /&gt;
Displaying values of sensors:  &amp;lt;code&amp;gt;&lt;br /&gt;
 val=analogRead(input_pin);&lt;br /&gt;
 Serial.print(val);&lt;br /&gt;
&amp;lt;/code&amp;gt; (assuming you&amp;#039;ve done the necessary setup).&lt;br /&gt;
&lt;br /&gt;
Checking program flow, communicating the status of things to the user or debugger (you!).&lt;br /&gt;
&lt;br /&gt;
Inside the Arduino software, we will use the &amp;quot;Serial Monitor&amp;quot; to observe what is going on with the serial port.  Here is where you will see data printed with the &amp;lt;code&amp;gt;Serial.print()&amp;lt;/code&amp;gt; command, and you can also send some very simple messages back to the processor with the &amp;quot;Send&amp;quot; button. &lt;br /&gt;
&lt;br /&gt;
*Open the Sketchbook-&amp;gt;Examples-&amp;gt;Communication-&amp;gt;ASCIITable, compile it, and run it on your processor. &lt;br /&gt;
* This program does basic text communication from the processor to your PC, running through all of the characters in the alphabet. &lt;br /&gt;
* Click on the &amp;quot;Serial Monitor&amp;quot; button (to the right of the &amp;quot;Upload to Board&amp;quot; button) in the arduino software.  verify that your processor is communicating with the PC (do you see the letters streaming by?)  This is your processor sending data to the computer. We will use this later.&lt;br /&gt;
&lt;br /&gt;
==  Sending Data from your Arduino to the Computer ==&lt;br /&gt;
For this section you are going to use three potentiometers (or light sensor, or whatever you would like) to drive an application on the computer. &lt;br /&gt;
Examples-&amp;gt;Communication-&amp;gt;VirtualColorMixer&lt;br /&gt;
* Wire up three potentiometers as voltage dividers (like last week), and connect them to Analog_IN pins 0, 1, and 2.&lt;br /&gt;
[[Image:Pot_in.png]] [[Image:Color_mixer_pot_in.jpg|300px]]&lt;br /&gt;
*Compile the Virtual Color Mixer, and upload it to your arduino. &lt;br /&gt;
*In the Serial Monitor, verify that you see R, G, and B values, and they change as you move the potentiometers.&lt;br /&gt;
[[Image:Color_mix_serialout.png|300px]]&lt;br /&gt;
*Create the processing Sketch &amp;quot;arduino_color_mixer&amp;quot;&lt;br /&gt;
*Change the Serial port in the initialization in Processing.  (&amp;lt;code&amp;gt;port = new Serial(this, Serial.list()[2], 9600);&amp;lt;/code&amp;gt; on my computer)&lt;br /&gt;
*Change  the &amp;lt;code&amp;gt;Integer.parseInt(buff);&amp;lt;/code&amp;gt; statements to say &amp;lt;code&amp;gt;rval = Integer.parseInt(buff)/4;&amp;lt;/code&amp;gt;.  This relates to the issue last week with the &amp;lt;code&amp;gt;analogRead()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;analogWrite()&amp;lt;/code&amp;gt;: our Arduino is transmitting a 10bit (0-1023) value captured from the &amp;lt;code&amp;gt;analogRead()&amp;lt;/code&amp;gt;, but the &amp;lt;code&amp;gt;background(rval, gval, bval);&amp;lt;/code&amp;gt; command in Processing wants 8bit (0-255) values for Red, Green, and Blue.  Thus, we need to divide the 10 bit values by 4.&lt;br /&gt;
[[Image:Arduino_color_mixer.png|300px]]&lt;br /&gt;
* Run this program (same as on the Arduino, click the little &amp;quot;Play&amp;quot; button at the upper left).  NOTE: Hold down the reset button on your Arduino while you start the Processing applet.  Release the button once the new window has appeared.  If you do not, the Processing applet will start reading mid-data stream, which will confuse it and crash.  You should see something like the window below: &lt;br /&gt;
[[Image:Color_mix.png]]&lt;br /&gt;
&lt;br /&gt;
* You should be able to change the color of the on-screen square by dialing the knobs back and forth.  This behavior could be anything: you could move images around on the screen according to the knobs, you could trigger media clips, you could fire off e-mails.  Anything you can program on the computer could be triggered by input from your Arduino.  This is the first half of an interactive microprocessor / computer sculpture.&lt;br /&gt;
&lt;br /&gt;
== Sending Data from the Computer to Control your Arduino ==&lt;br /&gt;
===Controlling a physical LED with the computer.===&lt;br /&gt;
* Compile the Examples-&amp;gt;Communication-&amp;gt;Dimmer example, and upload it to your board.  This example sets up communication on the serial port (in the &amp;lt;code&amp;gt;void setup()&amp;lt;/code&amp;gt; function, and then reads values from the &amp;lt;code&amp;gt;Serial&amp;lt;/code&amp;gt; input, and writes them to the &amp;lt;code&amp;gt;ledPin&amp;lt;/code&amp;gt; output. &lt;br /&gt;
* Connect up the TIP120 driver circuit and motor from last week to the &amp;lt;code&amp;gt;ledPin&amp;lt;/code&amp;gt; (pin 9).  You should now be able to control the motor speed via the serial port on your computer... interesting...&lt;br /&gt;
* Click on the Serial Monitor.  Try sending different values to the board.  Type in numbers and press Enter (or click on the &amp;quot;Send&amp;quot; button, either will work). &lt;br /&gt;
** What behavior do you observe? &lt;br /&gt;
** Can you get the motor to speed up or slow down? &lt;br /&gt;
=== modifying for rudimentary keyboard control ===&lt;br /&gt;
As-is, the Dimmer code is not very useful for controlling through the serial terminal like this.  Now we are going to modify it to so that it works a little better.  Our goal is to be able to set the speed of the motor typing the numbers 0-9 on the keyboard.  9 will go fastest (nearly full speed), and 0 will be a dead stop.  &lt;br /&gt;
* Make a new copy of the Dimmer example, and replace the original &amp;lt;code&amp;gt;loop()&amp;lt;/code&amp;gt; code with this new one:&lt;br /&gt;
 void loop()&lt;br /&gt;
 {&lt;br /&gt;
  char val;&lt;br /&gt;
  byte out_speed;&lt;br /&gt;
  // check if data has been sent from the computer&lt;br /&gt;
  if (Serial.available()) {&lt;br /&gt;
    // read the most recent byte (which will be from 0 to 255)&lt;br /&gt;
    val = Serial.read();&lt;br /&gt;
    &lt;br /&gt;
    if((val&amp;gt;=&amp;#039;0&amp;#039;)&amp;amp;&amp;amp;(val&amp;lt;=&amp;#039;9&amp;#039;)) {&lt;br /&gt;
      val=val-&amp;#039;0&amp;#039;; // set value between 0 and 9. &lt;br /&gt;
      out_speed=val*28; // set out_speed between 0 and 252.&lt;br /&gt;
      analogWrite(ledpin, out_speed);&lt;br /&gt;
    } &lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
*What I have done is change the &amp;lt;code&amp;gt;Serial.read()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;analogWrite()&amp;lt;/code&amp;gt; from before.  Now we are reading a &amp;lt;code&amp;gt;char&amp;lt;/code&amp;gt; rather than a &amp;lt;code&amp;gt;byte&amp;lt;/code&amp;gt; from the Serial port, and we are checking whether this character it reads is one of the characters between &amp;#039;0&amp;#039; and &amp;#039;9&amp;#039;: a letter on the keyboard was pressed, it is one of the numbers?  If it is (&amp;lt;code&amp;gt;if((val&amp;gt;=&amp;#039;0&amp;#039;)&amp;amp;&amp;amp;(val&amp;lt;=&amp;#039;9&amp;#039;))&amp;lt;/code&amp;gt;) then we will set the speed of the motor proportionally.&lt;br /&gt;
* Compile and upload this sketch to the board, and try it out.  Start the Serial Monitor again, and try sending the numbers 0-9 on the keyboard, the motor should speed up and slow down appropriately. &lt;br /&gt;
* EXPLANATION: What did we just do?  The problem in our original Dimmer code was that the microcontroller was looking just at the binary value of the data it was receiving, but did not know what key was pressed.  So, when we typed the number 0, which happens to have a binary value of ___ in the ASCII table, it will set the speed to that value, not to 0.  We changed the program so the microcontroller is looking for the specific characters, &amp;#039;0&amp;#039; to &amp;#039;9&amp;#039;, and then doing the appropriate math to set the output to the right speed.&lt;br /&gt;
&lt;br /&gt;
=== controlling your arduino from processing app ===&lt;br /&gt;
Save your modified Dimmer example, and revert back to the original dimmer code.  We are now going to learn how to control the processor from the processing App.  See the commented Processing code hidden at the end of the Dimmer program. &lt;br /&gt;
* In Processing, open a new sketch, and copy this code into it.  Save this sketch as &amp;quot;arduino_test&amp;quot; or something like that. It should look like this:&lt;br /&gt;
[[Image:Arduino_serialtest_processing.png|300px]]&lt;br /&gt;
* Try running this sketch.  When you do, it may give you an error about &amp;quot;COM1&amp;quot; or something of that sort.  You need to tell the program what serial port your arduino is connected to.  When the program runs, you will see a list of Serial ports, you can see mine in the picture above.  On my comnputer, I see that my serial port is the &amp;quot;tty.usbserial-A900acnt&amp;quot;, which is listed as device number 2 ([2]), so I go back into the processing code and change the line that says &amp;lt;code&amp;gt;port = new Serial&amp;lt;/code&amp;gt;... to read &amp;lt;code&amp;gt;port = new Serial(this, Serial.list()[2], 9600);&amp;lt;/code&amp;gt;&lt;br /&gt;
* Now if I run the sketch again, I know that it will be properly communicating with the Arduino.   You will need to modify that line to reflect whichever serial port your arduino is connected to.  &lt;br /&gt;
* Upload the original (unmodified) Dimmer code to your arduino in the arduino software.  Your processor should now be running that code... waiting for input!&lt;br /&gt;
* Run your newly created arduino_test sketch in processing.  You will see a small graphic window (like the one below), as you drag your mouse forwards and backwards across that window, your motor should speed up and slow down.  Allright!!  Now you have a simple graphical interface!&lt;br /&gt;
[[Image:Arduino_serialtest.png]]&lt;br /&gt;
* You can interface the arduino with any other program that can communicate via the serial port.  This could be MaxMSP, Java, C++, OpenFrameworks (http://www.openframeworks.cc/download) or many others.  Here is a complete list: http://www.arduino.cc/playground/Main/InterfacingWithSoftware&lt;br /&gt;
** Also you can communicate via network with one of these serial-to-network proxies: http://www.arduino.cc/playground/Interfacing/SerialNet&lt;br /&gt;
&lt;br /&gt;
== Send data from your sensor to the computer ==&lt;br /&gt;
* Assuming you have a sensor which produces an analog output, hook it up to one of the Analog Inputs on your arduino.  If you do not have a sensor, use the light sensor from last week.  If you are not sure how your sensor works, come over and talk to me and we can try to figure it out. &lt;br /&gt;
* Run a short program to read data from that sensor and send it to the Serial port.  &lt;br /&gt;
** You will need a &amp;lt;code&amp;gt;setup()&amp;lt;/code&amp;gt; block, which initializes the Serial communication &amp;lt;code&amp;gt;Serial.begin(9600);&amp;lt;/code&amp;gt;&lt;br /&gt;
** And in the  main loop of the program (&amp;lt;code&amp;gt;loop()&amp;lt;/code&amp;gt;), you will need to do the &amp;lt;code&amp;gt;analogRead()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Serial.print()&amp;lt;/code&amp;gt; commands from above.&lt;br /&gt;
* See what the output from your Sensor is.  How does it change as you manipulate your sensor? This is what we were getting at last week figuring out the voltage range for our sensors: when we want to use a sensor to make a project sensitive and responsive to the environment, we need to know what voltages correspond to the conditions of interest.  When you start with a new project, this sort of Serial communication is a very valuable tool.&lt;br /&gt;
&lt;br /&gt;
== Homework ==&lt;br /&gt;
With your sensor, build a simple computer/microprocessor project.  Establish communication between the computer and processor, either controlling the device with commands from your computer program, or driving the computer program with information from the processor.  You may use Processing, and adapt one of the simple examples we have seen in class, or you can use any other program you are comfortable with (Flash, MaxMSP, PD), so long as you can demonstrate it to us in class next week.  We will take the first part of class to look at your these mini-projects.  &amp;lt;!-- Also, please register on the wiki and post a short description of your project. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The little program from the first part of the lesson, where your Arduino program outputs the data from your sensor Serially will be useful here.  Now you just need to make a program on the computer to take that data and do something with it.  If you are looking for inspiration, pick a couple of the sketchbook examples in Processing and run a few of them.  You will need to intergrate the Serial data input into one of those examples, or come up with something new.  We can work on this in class today.&lt;br /&gt;
&lt;br /&gt;
== Interesting Side Note: Pachube ==&lt;br /&gt;
http://www.pachube.com/&lt;br /&gt;
a service that enables you to connect, tag and share real time sensor data from objects, devices, buildings and environments around the world. The key aim is to facilitate interaction between remote environments, both physical and virtual.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Extra Info: Interfacing with Other Devices ==&lt;br /&gt;
&lt;br /&gt;
Connecting to various external devices and components: http://www.arduino.cc/playground/Main/ComponentLib&lt;/div&gt;</summary>
		<author><name>Mchoy</name></author>	</entry>

	<entry>
		<id>http://wiki.roberttwomey.com/index.php?title=Week_3_Lab&amp;diff=498</id>
		<title>Week 3 Lab</title>
		<link rel="alternate" type="text/html" href="http://wiki.roberttwomey.com/index.php?title=Week_3_Lab&amp;diff=498"/>
				<updated>2009-04-20T21:06:32Z</updated>
		
		<summary type="html">&lt;p&gt;Mchoy: /* LED Dimming */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;from [[Electronic Technologies for Art]]&lt;br /&gt;
== Analog Input ==&lt;br /&gt;
* File-&amp;gt;Sketchbook-&amp;gt;Analog-&amp;gt;AnalogInput&lt;br /&gt;
&lt;br /&gt;
The value of the input signal changes the timing of the light: the lower the signal the lower the on-off frequency, the higher the signal, the higher the frequency.  We can return to this at the end of the lab.&lt;br /&gt;
&lt;br /&gt;
First we will use a potentiometer as our input. &lt;br /&gt;
=== Potentiometer ===&lt;br /&gt;
[[Image:Pot_in.png]]&lt;br /&gt;
&lt;br /&gt;
A_IN can be any of the Analog In pins (0-5) on your Freeduino.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Pot_photo.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
*Q1.1: What will the voltage at A_IN be?  What are the upper and lower values? (HINT: it is a voltage divider.  How do you calculate the voltage in a voltage divider?)&lt;br /&gt;
&lt;br /&gt;
=== photoresistor  ===&lt;br /&gt;
[[Image:Photo_resistor.png]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Photoresistor.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Take the photoresistor from your 147A kit, which has a resistance between 140k - 800 depending on your lighting conditions.&lt;br /&gt;
&lt;br /&gt;
*Q2.1: With the same R2 resistor (10k) from above, replacing R1 with the photoresistor, what range of voltages (and corresponding data values) would you expect to see at your A_IN pin?&lt;br /&gt;
&lt;br /&gt;
*Q2.2:  The important part of this sketch is the line where the microprocessor reads the analog input:&amp;lt;code&amp;gt;   val = analogRead(potPin);&amp;lt;/code&amp;gt; Looking at the Arduino help for that function (&amp;lt;code&amp;gt;analogRead()&amp;lt;/code&amp;gt;), what do you think the value &amp;lt;code&amp;gt;val&amp;lt;/code&amp;gt; will be for those highest and lowest voltages at your A_IN pin?&lt;br /&gt;
&lt;br /&gt;
*Q2.3: How can you verify your guess for the previous question?  Come up with a plausible method, and try it out.  Anything goes!  (even using functions next weeks material, like Sketchbook-&amp;gt;Communication-&amp;gt;Graph) If you have a good idea, share it with the class....&lt;br /&gt;
&lt;br /&gt;
* Q2.4: How could you make this more sensitive? There are least three ways to try... think in terms of the physical enclosure around the sensor, the hardware setup (a voltage divider), and the software (look at File-&amp;gt;Sketchbook-&amp;gt;Analog-&amp;gt;Calibration..., specifically the &amp;lt;code&amp;gt;map()&amp;lt;/code&amp;gt; function)&lt;br /&gt;
* Q2.5: Does changing the code make this more sensitive?&lt;br /&gt;
&lt;br /&gt;
=== FYI other sensors ===&lt;br /&gt;
I have some of them here if you want to try them. &lt;br /&gt;
&lt;br /&gt;
==== flex sensor ====&lt;br /&gt;
spectra symbol flex sensor [https://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&amp;amp;krypto=6pWdQhy2AZPZ2sD8W5xEl6aJV6WqDHEGqOKNa%2FdOSS9%2BxO5uYYYPAp%2FlelrGLAWKNyXGozz0WUJ%2B%0D%0APBDIeyVBNlu11KbfyDwz&amp;amp;ddkey=CookieLogon]&lt;br /&gt;
&lt;br /&gt;
==== home made strain gauge ====&lt;br /&gt;
A poor man&amp;#039;s flex sensor.  See page 32 in Forest Mims &amp;quot;Electronic Sensor Circuits &amp;amp; Projects&amp;quot; to make your own.&lt;br /&gt;
&lt;br /&gt;
==== force / pressure sensor ====&lt;br /&gt;
Force Sensing Resistor (FSR)  &lt;br /&gt;
&lt;br /&gt;
[[Image:FSR.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
Voltage returned is proportional to force applied to surface. [http://www.trossenrobotics.com/images/productdownloads/FSR%20data.pdf datasheet]&lt;br /&gt;
[http://www.trossenrobotics.com/store/p/3221-1-5-Inch-Force-Sensing-Resistor-FSR-.aspx purchase]&lt;br /&gt;
&lt;br /&gt;
Good for substantial physical interaction (this project: http://roberttwomey.com/hitme/)&lt;br /&gt;
&lt;br /&gt;
[http://www.trossenrobotics.com/store/c/2670-Force-Sensors-Pressure-Touch-Sensors.aspx more force sensors ]&lt;br /&gt;
&lt;br /&gt;
FlexiForce Sensors:&lt;br /&gt;
http://www.tekscan.com/flexiforce/flexiforce.html&lt;br /&gt;
&lt;br /&gt;
==== IR rangefinders ====&lt;br /&gt;
Sharp GP2D12 INFRA-RED RANGER&lt;br /&gt;
&lt;br /&gt;
[[Image:IR_RANGER.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;quot;This sensor takes a continuous distance reading and returns a corresponding analog voltage with a range of 10cm (4&amp;quot;) to 80cm (30&amp;quot;). The sensor package includes a JST 3-pin connector, three pre-crimped wires, and a booklet with detailed information and examples.&amp;quot; [http://www.acroname.com/robotics/parts/R48-IR12.html]&lt;br /&gt;
&lt;br /&gt;
[http://www.acroname.com/robotics/parts/SharpGP2D12-15.pdf datasheet]&lt;br /&gt;
&lt;br /&gt;
One of many Sharp Rangers, with different effective ranges [http://www.acroname.com/robotics/parts/sharp_guide.pdf comparison guide]&lt;br /&gt;
&lt;br /&gt;
==== Ultrasonic rangefinders ====&lt;br /&gt;
http://www.acroname.com/robotics/parts/R271-SRF05.html&lt;br /&gt;
range of four meters&lt;br /&gt;
&lt;br /&gt;
==== And more... ====&lt;br /&gt;
See the Homework section.&lt;br /&gt;
&lt;br /&gt;
=== can we sample sound? ===&lt;br /&gt;
&lt;br /&gt;
* That is a good question. &lt;br /&gt;
* We can do definitely do threshold detection: is a sound louder than a certain point.&lt;br /&gt;
* Can we make WAV files?  I Don&amp;#039;t Know...&lt;br /&gt;
&lt;br /&gt;
== Analog Output ==&lt;br /&gt;
Continually varying signals, rather than discrete &amp;quot;steps&amp;quot;. How does a digital microprocessor create an analog output? &lt;br /&gt;
&lt;br /&gt;
PWM, duty cycle, and effective voltage.&lt;br /&gt;
&lt;br /&gt;
=== LED Dimming ===&lt;br /&gt;
*File-&amp;gt;Sketchbook-&amp;gt;Examples-&amp;gt;Analog-&amp;gt;Fading&lt;br /&gt;
The crux of this sketch is the &amp;lt;code&amp;gt;analogWrite() &amp;lt;/code&amp;gt; function.  &lt;br /&gt;
&lt;br /&gt;
NOTE: The function &amp;lt;code&amp;gt;analogWrite()&amp;lt;/code&amp;gt; only works on some digital output pins.  Look up the help for the function, it will tell you which pins work: Digital pins  3,5,6,9,10, and 11.&lt;br /&gt;
&amp;lt;youtube v=&amp;quot;62gWVWCyw_w&amp;quot; loop=&amp;quot;true&amp;quot;/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Image:LED_FADER.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
* It looks like a MacBook napping...&lt;br /&gt;
* Get this working.  Then...&lt;br /&gt;
* Q: Drive this dimming example with the light sensor from before.  &lt;br /&gt;
** use &amp;lt;code&amp;gt;analogRead()&amp;lt;/code&amp;gt; to get the value from the sensor, like you did before, then use &amp;lt;code&amp;gt;analogWrite()&amp;lt;/code&amp;gt; to output the value to the LED.  NOTE: &amp;lt;code&amp;gt;analogRead()&amp;lt;/code&amp;gt; will return values from 0-1023, and &amp;lt;code&amp;gt;analogWrite()&amp;lt;/code&amp;gt; writes values from 0 to 255, so you will need to divide your read value by 4 to get the output value.  Or you could use &amp;lt;code&amp;gt;map()&amp;lt;/code&amp;gt; &lt;br /&gt;
* Q3.1: Does yours turn on when it is light, or does it turn off?  Switch this to give it the opposite behavior, in either hardware or software.  You could do either!&lt;br /&gt;
&lt;br /&gt;
=== Lightbulb ===&lt;br /&gt;
Same as the LED, but with a higher current load: your microprocessor can not source enough current to power the bulb. (Or maybe it can, but you probably don&amp;#039;t want to test it!)  We need to use a power transistor: TIP120. This allows you to control a larger current (the bulb) with a smaller current (digital out from the chip). &lt;br /&gt;
&lt;br /&gt;
[[Image:Lamp_fader.png]]&lt;br /&gt;
&lt;br /&gt;
[[Image:BULB.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Motor ===&lt;br /&gt;
* Basic motor speed control (for a DC motor).  &lt;br /&gt;
* Same circuit as above, swapping the motor for the lamp. &lt;br /&gt;
&lt;br /&gt;
[[Image:MOTOR_SPEED.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Q: Drive it with the input from the potentiometer.&lt;br /&gt;
&lt;br /&gt;
=== Sound/Tone Generation! For Sound People (optional) ===&lt;br /&gt;
An analog output, different from the light dimmer.  To make a varying sound, you would want to change the frequency of the output signal, not the amplitude.&lt;br /&gt;
* This is more like the light blinking from part one, where changing the input voltage will change the rate of the light.  But now you will do it with a Piezo, adjusting the time delay in microseconds. &lt;br /&gt;
* If you like sound, try this: http://www.arduino.cc/en/Tutorial/PlayMelody, I have a piezo you can use.  (Or you can get one at RadioShack).&lt;br /&gt;
* This example adjusts the frequency of the output (tone) not the magnitude. &lt;br /&gt;
* the light fading above (&amp;lt;code&amp;gt;analogWrite()&amp;lt;/code&amp;gt;) adjusts the brightness of the light (magnitude) with PWM.&lt;br /&gt;
&lt;br /&gt;
== Homework ==&lt;br /&gt;
NEW ASSIGNMENT: &lt;br /&gt;
Acquire a sensor of some sort... not one of the ones from your kit.  Could be a pressure, temperature, VOC, range-finder, accelerometer (!!) ... there are lots of options.  Start with some of the links below.  If you need more ideas, look through the web.  Be sure to have your new sensor by next week!! We are going to use them in class, for Serial Communications. &lt;br /&gt;
&lt;br /&gt;
Don&amp;#039;t worry if you don&amp;#039;t know how to make it work: if you are concerned whether your choice is viable, send me an e-mail with a link to your sensor of interest before you get it. &lt;br /&gt;
&lt;br /&gt;
MORE SENSORS:&lt;br /&gt;
* http://www.sparkfun.com/commerce/categories.php?c=23&lt;br /&gt;
&lt;br /&gt;
===A Cornucopia of sensors===&lt;br /&gt;
I gave some examples of sensors in the first part of today&amp;#039;s lab. &lt;br /&gt;
* http://www.acroname.com/robotics/parts/c_Sensors.html&lt;br /&gt;
* Very good for interactive artworks!&lt;br /&gt;
* What else looks interesting?&lt;br /&gt;
** temperature&lt;br /&gt;
** pressure&lt;br /&gt;
** VOCs (Volatile Organic Compounds) [http://www.synkera.com/pdf/Synkera%20VOC%20Data%20Sheet.pdf] (see Natalie Jeremijenko&amp;#039;s Feral Robotic Dogs: http://www.nyu.edu/projects/xdesign/feralrobots/)&lt;br /&gt;
** Hall Effect sensor&lt;br /&gt;
&lt;br /&gt;
===Actuators, for future reference===&lt;br /&gt;
&lt;br /&gt;
[[Image:SERVO.JPG|400px]] &lt;br /&gt;
&lt;br /&gt;
Servo&lt;br /&gt;
&lt;br /&gt;
[[Image:SOLENOID.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Solenoid&lt;br /&gt;
&lt;br /&gt;
Stepper Motor&lt;br /&gt;
&lt;br /&gt;
Cellphone buzzer (I have one here)&lt;br /&gt;
&lt;br /&gt;
[[Image:Buzzer.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
AC appliances with a relay (!!!!CAUTION CAUTION CAUTION!!! get input from me before you try anything VERY DANGEROUS!!!!) (think dancing pixar light) &lt;br /&gt;
&lt;br /&gt;
Anything that moves, blinks, has activity, and runs off electricity... ?&lt;br /&gt;
&lt;br /&gt;
== BONUS ==&lt;br /&gt;
Cadsoft EaglePCB - the program I have been using to make these schematics. http://www.cadsoft.de/download.htm&lt;br /&gt;
&lt;br /&gt;
If you want to get a headstart on the future, download this software.  It is free.  You can use it to design circuits, from schematic to layout to fabrication.  (FYI It is also installed on the lab computers)&lt;/div&gt;</summary>
		<author><name>Mchoy</name></author>	</entry>

	<entry>
		<id>http://wiki.roberttwomey.com/index.php?title=Week_3_Lab&amp;diff=497</id>
		<title>Week 3 Lab</title>
		<link rel="alternate" type="text/html" href="http://wiki.roberttwomey.com/index.php?title=Week_3_Lab&amp;diff=497"/>
				<updated>2009-04-20T21:06:12Z</updated>
		
		<summary type="html">&lt;p&gt;Mchoy: /* photoresistor */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;from [[Electronic Technologies for Art]]&lt;br /&gt;
== Analog Input ==&lt;br /&gt;
* File-&amp;gt;Sketchbook-&amp;gt;Analog-&amp;gt;AnalogInput&lt;br /&gt;
&lt;br /&gt;
The value of the input signal changes the timing of the light: the lower the signal the lower the on-off frequency, the higher the signal, the higher the frequency.  We can return to this at the end of the lab.&lt;br /&gt;
&lt;br /&gt;
First we will use a potentiometer as our input. &lt;br /&gt;
=== Potentiometer ===&lt;br /&gt;
[[Image:Pot_in.png]]&lt;br /&gt;
&lt;br /&gt;
A_IN can be any of the Analog In pins (0-5) on your Freeduino.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Pot_photo.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
*Q1.1: What will the voltage at A_IN be?  What are the upper and lower values? (HINT: it is a voltage divider.  How do you calculate the voltage in a voltage divider?)&lt;br /&gt;
&lt;br /&gt;
=== photoresistor  ===&lt;br /&gt;
[[Image:Photo_resistor.png]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Photoresistor.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Take the photoresistor from your 147A kit, which has a resistance between 140k - 800 depending on your lighting conditions.&lt;br /&gt;
&lt;br /&gt;
*Q2.1: With the same R2 resistor (10k) from above, replacing R1 with the photoresistor, what range of voltages (and corresponding data values) would you expect to see at your A_IN pin?&lt;br /&gt;
&lt;br /&gt;
*Q2.2:  The important part of this sketch is the line where the microprocessor reads the analog input:&amp;lt;code&amp;gt;   val = analogRead(potPin);&amp;lt;/code&amp;gt; Looking at the Arduino help for that function (&amp;lt;code&amp;gt;analogRead()&amp;lt;/code&amp;gt;), what do you think the value &amp;lt;code&amp;gt;val&amp;lt;/code&amp;gt; will be for those highest and lowest voltages at your A_IN pin?&lt;br /&gt;
&lt;br /&gt;
*Q2.3: How can you verify your guess for the previous question?  Come up with a plausible method, and try it out.  Anything goes!  (even using functions next weeks material, like Sketchbook-&amp;gt;Communication-&amp;gt;Graph) If you have a good idea, share it with the class....&lt;br /&gt;
&lt;br /&gt;
* Q2.4: How could you make this more sensitive? There are least three ways to try... think in terms of the physical enclosure around the sensor, the hardware setup (a voltage divider), and the software (look at File-&amp;gt;Sketchbook-&amp;gt;Analog-&amp;gt;Calibration..., specifically the &amp;lt;code&amp;gt;map()&amp;lt;/code&amp;gt; function)&lt;br /&gt;
* Q2.5: Does changing the code make this more sensitive?&lt;br /&gt;
&lt;br /&gt;
=== FYI other sensors ===&lt;br /&gt;
I have some of them here if you want to try them. &lt;br /&gt;
&lt;br /&gt;
==== flex sensor ====&lt;br /&gt;
spectra symbol flex sensor [https://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&amp;amp;krypto=6pWdQhy2AZPZ2sD8W5xEl6aJV6WqDHEGqOKNa%2FdOSS9%2BxO5uYYYPAp%2FlelrGLAWKNyXGozz0WUJ%2B%0D%0APBDIeyVBNlu11KbfyDwz&amp;amp;ddkey=CookieLogon]&lt;br /&gt;
&lt;br /&gt;
==== home made strain gauge ====&lt;br /&gt;
A poor man&amp;#039;s flex sensor.  See page 32 in Forest Mims &amp;quot;Electronic Sensor Circuits &amp;amp; Projects&amp;quot; to make your own.&lt;br /&gt;
&lt;br /&gt;
==== force / pressure sensor ====&lt;br /&gt;
Force Sensing Resistor (FSR)  &lt;br /&gt;
&lt;br /&gt;
[[Image:FSR.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
Voltage returned is proportional to force applied to surface. [http://www.trossenrobotics.com/images/productdownloads/FSR%20data.pdf datasheet]&lt;br /&gt;
[http://www.trossenrobotics.com/store/p/3221-1-5-Inch-Force-Sensing-Resistor-FSR-.aspx purchase]&lt;br /&gt;
&lt;br /&gt;
Good for substantial physical interaction (this project: http://roberttwomey.com/hitme/)&lt;br /&gt;
&lt;br /&gt;
[http://www.trossenrobotics.com/store/c/2670-Force-Sensors-Pressure-Touch-Sensors.aspx more force sensors ]&lt;br /&gt;
&lt;br /&gt;
FlexiForce Sensors:&lt;br /&gt;
http://www.tekscan.com/flexiforce/flexiforce.html&lt;br /&gt;
&lt;br /&gt;
==== IR rangefinders ====&lt;br /&gt;
Sharp GP2D12 INFRA-RED RANGER&lt;br /&gt;
&lt;br /&gt;
[[Image:IR_RANGER.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;quot;This sensor takes a continuous distance reading and returns a corresponding analog voltage with a range of 10cm (4&amp;quot;) to 80cm (30&amp;quot;). The sensor package includes a JST 3-pin connector, three pre-crimped wires, and a booklet with detailed information and examples.&amp;quot; [http://www.acroname.com/robotics/parts/R48-IR12.html]&lt;br /&gt;
&lt;br /&gt;
[http://www.acroname.com/robotics/parts/SharpGP2D12-15.pdf datasheet]&lt;br /&gt;
&lt;br /&gt;
One of many Sharp Rangers, with different effective ranges [http://www.acroname.com/robotics/parts/sharp_guide.pdf comparison guide]&lt;br /&gt;
&lt;br /&gt;
==== Ultrasonic rangefinders ====&lt;br /&gt;
http://www.acroname.com/robotics/parts/R271-SRF05.html&lt;br /&gt;
range of four meters&lt;br /&gt;
&lt;br /&gt;
==== And more... ====&lt;br /&gt;
See the Homework section.&lt;br /&gt;
&lt;br /&gt;
=== can we sample sound? ===&lt;br /&gt;
&lt;br /&gt;
* That is a good question. &lt;br /&gt;
* We can do definitely do threshold detection: is a sound louder than a certain point.&lt;br /&gt;
* Can we make WAV files?  I Don&amp;#039;t Know...&lt;br /&gt;
&lt;br /&gt;
== Analog Output ==&lt;br /&gt;
Continually varying signals, rather than discrete &amp;quot;steps&amp;quot;. How does a digital microprocessor create an analog output? &lt;br /&gt;
&lt;br /&gt;
PWM, duty cycle, and effective voltage.&lt;br /&gt;
&lt;br /&gt;
=== LED Dimming ===&lt;br /&gt;
*File-&amp;gt;Sketchbook-&amp;gt;Examples-&amp;gt;Analog-&amp;gt;Fading&lt;br /&gt;
The crux of this sketch is the &amp;lt;code&amp;gt;analogWrite() &amp;lt;/code&amp;gt; function.  &lt;br /&gt;
&lt;br /&gt;
NOTE: The function &amp;lt;code&amp;gt;analogWrite()&amp;lt;/code&amp;gt; only works on some digital output pins.  Look up the help for the function, it will tell you which pins work: Digital pins  3,5,6,9,10, and 11.&lt;br /&gt;
&amp;lt;youtube v=&amp;quot;62gWVWCyw_w&amp;quot; loop=&amp;quot;true&amp;quot;/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Image:LED_FADER.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
* It looks like a MacBook napping...&lt;br /&gt;
* Get this working.  Then...&lt;br /&gt;
* Q: Drive this dimming example with the light sensor from before.  &lt;br /&gt;
** use &amp;lt;code&amp;gt;analogRead()&amp;lt;/code&amp;gt; to get the value from the sensor, like you did before, then use &amp;lt;code&amp;gt;analogWrite()&amp;lt;/code&amp;gt; to output the value to the LED.  NOTE: &amp;lt;code&amp;gt;analogRead()&amp;lt;/code&amp;gt; will return values from 0-1023, and &amp;lt;code&amp;gt;analogWrite()&amp;lt;/code&amp;gt; writes values from 0 to 255, so you will need to divide your read value by 4 to get the output value.  Or you could use &amp;lt;code&amp;gt;map()&amp;lt;/code&amp;gt; &lt;br /&gt;
* Q: Does yours turn on when it is light, or does it turn off?  Switch this to give it the opposite behavior, in either hardware or software.  You could do either!&lt;br /&gt;
&lt;br /&gt;
=== Lightbulb ===&lt;br /&gt;
Same as the LED, but with a higher current load: your microprocessor can not source enough current to power the bulb. (Or maybe it can, but you probably don&amp;#039;t want to test it!)  We need to use a power transistor: TIP120. This allows you to control a larger current (the bulb) with a smaller current (digital out from the chip). &lt;br /&gt;
&lt;br /&gt;
[[Image:Lamp_fader.png]]&lt;br /&gt;
&lt;br /&gt;
[[Image:BULB.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Motor ===&lt;br /&gt;
* Basic motor speed control (for a DC motor).  &lt;br /&gt;
* Same circuit as above, swapping the motor for the lamp. &lt;br /&gt;
&lt;br /&gt;
[[Image:MOTOR_SPEED.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Q: Drive it with the input from the potentiometer.&lt;br /&gt;
&lt;br /&gt;
=== Sound/Tone Generation! For Sound People (optional) ===&lt;br /&gt;
An analog output, different from the light dimmer.  To make a varying sound, you would want to change the frequency of the output signal, not the amplitude.&lt;br /&gt;
* This is more like the light blinking from part one, where changing the input voltage will change the rate of the light.  But now you will do it with a Piezo, adjusting the time delay in microseconds. &lt;br /&gt;
* If you like sound, try this: http://www.arduino.cc/en/Tutorial/PlayMelody, I have a piezo you can use.  (Or you can get one at RadioShack).&lt;br /&gt;
* This example adjusts the frequency of the output (tone) not the magnitude. &lt;br /&gt;
* the light fading above (&amp;lt;code&amp;gt;analogWrite()&amp;lt;/code&amp;gt;) adjusts the brightness of the light (magnitude) with PWM.&lt;br /&gt;
&lt;br /&gt;
== Homework ==&lt;br /&gt;
NEW ASSIGNMENT: &lt;br /&gt;
Acquire a sensor of some sort... not one of the ones from your kit.  Could be a pressure, temperature, VOC, range-finder, accelerometer (!!) ... there are lots of options.  Start with some of the links below.  If you need more ideas, look through the web.  Be sure to have your new sensor by next week!! We are going to use them in class, for Serial Communications. &lt;br /&gt;
&lt;br /&gt;
Don&amp;#039;t worry if you don&amp;#039;t know how to make it work: if you are concerned whether your choice is viable, send me an e-mail with a link to your sensor of interest before you get it. &lt;br /&gt;
&lt;br /&gt;
MORE SENSORS:&lt;br /&gt;
* http://www.sparkfun.com/commerce/categories.php?c=23&lt;br /&gt;
&lt;br /&gt;
===A Cornucopia of sensors===&lt;br /&gt;
I gave some examples of sensors in the first part of today&amp;#039;s lab. &lt;br /&gt;
* http://www.acroname.com/robotics/parts/c_Sensors.html&lt;br /&gt;
* Very good for interactive artworks!&lt;br /&gt;
* What else looks interesting?&lt;br /&gt;
** temperature&lt;br /&gt;
** pressure&lt;br /&gt;
** VOCs (Volatile Organic Compounds) [http://www.synkera.com/pdf/Synkera%20VOC%20Data%20Sheet.pdf] (see Natalie Jeremijenko&amp;#039;s Feral Robotic Dogs: http://www.nyu.edu/projects/xdesign/feralrobots/)&lt;br /&gt;
** Hall Effect sensor&lt;br /&gt;
&lt;br /&gt;
===Actuators, for future reference===&lt;br /&gt;
&lt;br /&gt;
[[Image:SERVO.JPG|400px]] &lt;br /&gt;
&lt;br /&gt;
Servo&lt;br /&gt;
&lt;br /&gt;
[[Image:SOLENOID.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Solenoid&lt;br /&gt;
&lt;br /&gt;
Stepper Motor&lt;br /&gt;
&lt;br /&gt;
Cellphone buzzer (I have one here)&lt;br /&gt;
&lt;br /&gt;
[[Image:Buzzer.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
AC appliances with a relay (!!!!CAUTION CAUTION CAUTION!!! get input from me before you try anything VERY DANGEROUS!!!!) (think dancing pixar light) &lt;br /&gt;
&lt;br /&gt;
Anything that moves, blinks, has activity, and runs off electricity... ?&lt;br /&gt;
&lt;br /&gt;
== BONUS ==&lt;br /&gt;
Cadsoft EaglePCB - the program I have been using to make these schematics. http://www.cadsoft.de/download.htm&lt;br /&gt;
&lt;br /&gt;
If you want to get a headstart on the future, download this software.  It is free.  You can use it to design circuits, from schematic to layout to fabrication.  (FYI It is also installed on the lab computers)&lt;/div&gt;</summary>
		<author><name>Mchoy</name></author>	</entry>

	<entry>
		<id>http://wiki.roberttwomey.com/index.php?title=Week_3_Lab&amp;diff=496</id>
		<title>Week 3 Lab</title>
		<link rel="alternate" type="text/html" href="http://wiki.roberttwomey.com/index.php?title=Week_3_Lab&amp;diff=496"/>
				<updated>2009-04-20T21:05:50Z</updated>
		
		<summary type="html">&lt;p&gt;Mchoy: /* Potentiometer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;from [[Electronic Technologies for Art]]&lt;br /&gt;
== Analog Input ==&lt;br /&gt;
* File-&amp;gt;Sketchbook-&amp;gt;Analog-&amp;gt;AnalogInput&lt;br /&gt;
&lt;br /&gt;
The value of the input signal changes the timing of the light: the lower the signal the lower the on-off frequency, the higher the signal, the higher the frequency.  We can return to this at the end of the lab.&lt;br /&gt;
&lt;br /&gt;
First we will use a potentiometer as our input. &lt;br /&gt;
=== Potentiometer ===&lt;br /&gt;
[[Image:Pot_in.png]]&lt;br /&gt;
&lt;br /&gt;
A_IN can be any of the Analog In pins (0-5) on your Freeduino.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Pot_photo.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
*Q1.1: What will the voltage at A_IN be?  What are the upper and lower values? (HINT: it is a voltage divider.  How do you calculate the voltage in a voltage divider?)&lt;br /&gt;
&lt;br /&gt;
=== photoresistor  ===&lt;br /&gt;
[[Image:Photo_resistor.png]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Photoresistor.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Take the photoresistor from your 147A kit, which has a resistance between 140k - 800 depending on your lighting conditions.&lt;br /&gt;
&lt;br /&gt;
*Q: With the same R2 resistor (10k) from above, replacing R1 with the photoresistor, what range of voltages (and corresponding data values) would you expect to see at your A_IN pin?&lt;br /&gt;
&lt;br /&gt;
*Q:  The important part of this sketch is the line where the microprocessor reads the analog input:&amp;lt;code&amp;gt;   val = analogRead(potPin);&amp;lt;/code&amp;gt; Looking at the Arduino help for that function (&amp;lt;code&amp;gt;analogRead()&amp;lt;/code&amp;gt;), what do you think the value &amp;lt;code&amp;gt;val&amp;lt;/code&amp;gt; will be for those highest and lowest voltages at your A_IN pin?&lt;br /&gt;
&lt;br /&gt;
*Q: How can you verify your guess for the previous question?  Come up with a plausible method, and try it out.  Anything goes!  (even using functions next weeks material, like Sketchbook-&amp;gt;Communication-&amp;gt;Graph) If you have a good idea, share it with the class....&lt;br /&gt;
&lt;br /&gt;
* Q: How could you make this more sensitive? There are least three ways to try... think in terms of the physical enclosure around the sensor, the hardware setup (a voltage divider), and the software (look at File-&amp;gt;Sketchbook-&amp;gt;Analog-&amp;gt;Calibration..., specifically the &amp;lt;code&amp;gt;map()&amp;lt;/code&amp;gt; function)&lt;br /&gt;
* Q: Does changing the code make this more sensitive?&lt;br /&gt;
&lt;br /&gt;
=== FYI other sensors ===&lt;br /&gt;
I have some of them here if you want to try them. &lt;br /&gt;
&lt;br /&gt;
==== flex sensor ====&lt;br /&gt;
spectra symbol flex sensor [https://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&amp;amp;krypto=6pWdQhy2AZPZ2sD8W5xEl6aJV6WqDHEGqOKNa%2FdOSS9%2BxO5uYYYPAp%2FlelrGLAWKNyXGozz0WUJ%2B%0D%0APBDIeyVBNlu11KbfyDwz&amp;amp;ddkey=CookieLogon]&lt;br /&gt;
&lt;br /&gt;
==== home made strain gauge ====&lt;br /&gt;
A poor man&amp;#039;s flex sensor.  See page 32 in Forest Mims &amp;quot;Electronic Sensor Circuits &amp;amp; Projects&amp;quot; to make your own.&lt;br /&gt;
&lt;br /&gt;
==== force / pressure sensor ====&lt;br /&gt;
Force Sensing Resistor (FSR)  &lt;br /&gt;
&lt;br /&gt;
[[Image:FSR.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
Voltage returned is proportional to force applied to surface. [http://www.trossenrobotics.com/images/productdownloads/FSR%20data.pdf datasheet]&lt;br /&gt;
[http://www.trossenrobotics.com/store/p/3221-1-5-Inch-Force-Sensing-Resistor-FSR-.aspx purchase]&lt;br /&gt;
&lt;br /&gt;
Good for substantial physical interaction (this project: http://roberttwomey.com/hitme/)&lt;br /&gt;
&lt;br /&gt;
[http://www.trossenrobotics.com/store/c/2670-Force-Sensors-Pressure-Touch-Sensors.aspx more force sensors ]&lt;br /&gt;
&lt;br /&gt;
FlexiForce Sensors:&lt;br /&gt;
http://www.tekscan.com/flexiforce/flexiforce.html&lt;br /&gt;
&lt;br /&gt;
==== IR rangefinders ====&lt;br /&gt;
Sharp GP2D12 INFRA-RED RANGER&lt;br /&gt;
&lt;br /&gt;
[[Image:IR_RANGER.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;quot;This sensor takes a continuous distance reading and returns a corresponding analog voltage with a range of 10cm (4&amp;quot;) to 80cm (30&amp;quot;). The sensor package includes a JST 3-pin connector, three pre-crimped wires, and a booklet with detailed information and examples.&amp;quot; [http://www.acroname.com/robotics/parts/R48-IR12.html]&lt;br /&gt;
&lt;br /&gt;
[http://www.acroname.com/robotics/parts/SharpGP2D12-15.pdf datasheet]&lt;br /&gt;
&lt;br /&gt;
One of many Sharp Rangers, with different effective ranges [http://www.acroname.com/robotics/parts/sharp_guide.pdf comparison guide]&lt;br /&gt;
&lt;br /&gt;
==== Ultrasonic rangefinders ====&lt;br /&gt;
http://www.acroname.com/robotics/parts/R271-SRF05.html&lt;br /&gt;
range of four meters&lt;br /&gt;
&lt;br /&gt;
==== And more... ====&lt;br /&gt;
See the Homework section.&lt;br /&gt;
&lt;br /&gt;
=== can we sample sound? ===&lt;br /&gt;
&lt;br /&gt;
* That is a good question. &lt;br /&gt;
* We can do definitely do threshold detection: is a sound louder than a certain point.&lt;br /&gt;
* Can we make WAV files?  I Don&amp;#039;t Know...&lt;br /&gt;
&lt;br /&gt;
== Analog Output ==&lt;br /&gt;
Continually varying signals, rather than discrete &amp;quot;steps&amp;quot;. How does a digital microprocessor create an analog output? &lt;br /&gt;
&lt;br /&gt;
PWM, duty cycle, and effective voltage.&lt;br /&gt;
&lt;br /&gt;
=== LED Dimming ===&lt;br /&gt;
*File-&amp;gt;Sketchbook-&amp;gt;Examples-&amp;gt;Analog-&amp;gt;Fading&lt;br /&gt;
The crux of this sketch is the &amp;lt;code&amp;gt;analogWrite() &amp;lt;/code&amp;gt; function.  &lt;br /&gt;
&lt;br /&gt;
NOTE: The function &amp;lt;code&amp;gt;analogWrite()&amp;lt;/code&amp;gt; only works on some digital output pins.  Look up the help for the function, it will tell you which pins work: Digital pins  3,5,6,9,10, and 11.&lt;br /&gt;
&amp;lt;youtube v=&amp;quot;62gWVWCyw_w&amp;quot; loop=&amp;quot;true&amp;quot;/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Image:LED_FADER.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
* It looks like a MacBook napping...&lt;br /&gt;
* Get this working.  Then...&lt;br /&gt;
* Q: Drive this dimming example with the light sensor from before.  &lt;br /&gt;
** use &amp;lt;code&amp;gt;analogRead()&amp;lt;/code&amp;gt; to get the value from the sensor, like you did before, then use &amp;lt;code&amp;gt;analogWrite()&amp;lt;/code&amp;gt; to output the value to the LED.  NOTE: &amp;lt;code&amp;gt;analogRead()&amp;lt;/code&amp;gt; will return values from 0-1023, and &amp;lt;code&amp;gt;analogWrite()&amp;lt;/code&amp;gt; writes values from 0 to 255, so you will need to divide your read value by 4 to get the output value.  Or you could use &amp;lt;code&amp;gt;map()&amp;lt;/code&amp;gt; &lt;br /&gt;
* Q: Does yours turn on when it is light, or does it turn off?  Switch this to give it the opposite behavior, in either hardware or software.  You could do either!&lt;br /&gt;
&lt;br /&gt;
=== Lightbulb ===&lt;br /&gt;
Same as the LED, but with a higher current load: your microprocessor can not source enough current to power the bulb. (Or maybe it can, but you probably don&amp;#039;t want to test it!)  We need to use a power transistor: TIP120. This allows you to control a larger current (the bulb) with a smaller current (digital out from the chip). &lt;br /&gt;
&lt;br /&gt;
[[Image:Lamp_fader.png]]&lt;br /&gt;
&lt;br /&gt;
[[Image:BULB.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Motor ===&lt;br /&gt;
* Basic motor speed control (for a DC motor).  &lt;br /&gt;
* Same circuit as above, swapping the motor for the lamp. &lt;br /&gt;
&lt;br /&gt;
[[Image:MOTOR_SPEED.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Q: Drive it with the input from the potentiometer.&lt;br /&gt;
&lt;br /&gt;
=== Sound/Tone Generation! For Sound People (optional) ===&lt;br /&gt;
An analog output, different from the light dimmer.  To make a varying sound, you would want to change the frequency of the output signal, not the amplitude.&lt;br /&gt;
* This is more like the light blinking from part one, where changing the input voltage will change the rate of the light.  But now you will do it with a Piezo, adjusting the time delay in microseconds. &lt;br /&gt;
* If you like sound, try this: http://www.arduino.cc/en/Tutorial/PlayMelody, I have a piezo you can use.  (Or you can get one at RadioShack).&lt;br /&gt;
* This example adjusts the frequency of the output (tone) not the magnitude. &lt;br /&gt;
* the light fading above (&amp;lt;code&amp;gt;analogWrite()&amp;lt;/code&amp;gt;) adjusts the brightness of the light (magnitude) with PWM.&lt;br /&gt;
&lt;br /&gt;
== Homework ==&lt;br /&gt;
NEW ASSIGNMENT: &lt;br /&gt;
Acquire a sensor of some sort... not one of the ones from your kit.  Could be a pressure, temperature, VOC, range-finder, accelerometer (!!) ... there are lots of options.  Start with some of the links below.  If you need more ideas, look through the web.  Be sure to have your new sensor by next week!! We are going to use them in class, for Serial Communications. &lt;br /&gt;
&lt;br /&gt;
Don&amp;#039;t worry if you don&amp;#039;t know how to make it work: if you are concerned whether your choice is viable, send me an e-mail with a link to your sensor of interest before you get it. &lt;br /&gt;
&lt;br /&gt;
MORE SENSORS:&lt;br /&gt;
* http://www.sparkfun.com/commerce/categories.php?c=23&lt;br /&gt;
&lt;br /&gt;
===A Cornucopia of sensors===&lt;br /&gt;
I gave some examples of sensors in the first part of today&amp;#039;s lab. &lt;br /&gt;
* http://www.acroname.com/robotics/parts/c_Sensors.html&lt;br /&gt;
* Very good for interactive artworks!&lt;br /&gt;
* What else looks interesting?&lt;br /&gt;
** temperature&lt;br /&gt;
** pressure&lt;br /&gt;
** VOCs (Volatile Organic Compounds) [http://www.synkera.com/pdf/Synkera%20VOC%20Data%20Sheet.pdf] (see Natalie Jeremijenko&amp;#039;s Feral Robotic Dogs: http://www.nyu.edu/projects/xdesign/feralrobots/)&lt;br /&gt;
** Hall Effect sensor&lt;br /&gt;
&lt;br /&gt;
===Actuators, for future reference===&lt;br /&gt;
&lt;br /&gt;
[[Image:SERVO.JPG|400px]] &lt;br /&gt;
&lt;br /&gt;
Servo&lt;br /&gt;
&lt;br /&gt;
[[Image:SOLENOID.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Solenoid&lt;br /&gt;
&lt;br /&gt;
Stepper Motor&lt;br /&gt;
&lt;br /&gt;
Cellphone buzzer (I have one here)&lt;br /&gt;
&lt;br /&gt;
[[Image:Buzzer.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
AC appliances with a relay (!!!!CAUTION CAUTION CAUTION!!! get input from me before you try anything VERY DANGEROUS!!!!) (think dancing pixar light) &lt;br /&gt;
&lt;br /&gt;
Anything that moves, blinks, has activity, and runs off electricity... ?&lt;br /&gt;
&lt;br /&gt;
== BONUS ==&lt;br /&gt;
Cadsoft EaglePCB - the program I have been using to make these schematics. http://www.cadsoft.de/download.htm&lt;br /&gt;
&lt;br /&gt;
If you want to get a headstart on the future, download this software.  It is free.  You can use it to design circuits, from schematic to layout to fabrication.  (FYI It is also installed on the lab computers)&lt;/div&gt;</summary>
		<author><name>Mchoy</name></author>	</entry>

	<entry>
		<id>http://wiki.roberttwomey.com/index.php?title=Week_3_Lab&amp;diff=495</id>
		<title>Week 3 Lab</title>
		<link rel="alternate" type="text/html" href="http://wiki.roberttwomey.com/index.php?title=Week_3_Lab&amp;diff=495"/>
				<updated>2009-04-20T21:05:30Z</updated>
		
		<summary type="html">&lt;p&gt;Mchoy: /* Potentiometer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;from [[Electronic Technologies for Art]]&lt;br /&gt;
== Analog Input ==&lt;br /&gt;
* File-&amp;gt;Sketchbook-&amp;gt;Analog-&amp;gt;AnalogInput&lt;br /&gt;
&lt;br /&gt;
The value of the input signal changes the timing of the light: the lower the signal the lower the on-off frequency, the higher the signal, the higher the frequency.  We can return to this at the end of the lab.&lt;br /&gt;
&lt;br /&gt;
First we will use a potentiometer as our input. &lt;br /&gt;
=== Potentiometer ===&lt;br /&gt;
[[Image:Pot_in.png]]&lt;br /&gt;
&lt;br /&gt;
A_IN can be any of the Analog In pins (0-5) on your Freeduino.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Pot_photo.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
*Q1: What will the voltage at A_IN be?  What are the upper and lower values? (HINT: it is a voltage divider.  How do you calculate the voltage in a voltage divider?)&lt;br /&gt;
&lt;br /&gt;
=== photoresistor  ===&lt;br /&gt;
[[Image:Photo_resistor.png]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Photoresistor.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Take the photoresistor from your 147A kit, which has a resistance between 140k - 800 depending on your lighting conditions.&lt;br /&gt;
&lt;br /&gt;
*Q: With the same R2 resistor (10k) from above, replacing R1 with the photoresistor, what range of voltages (and corresponding data values) would you expect to see at your A_IN pin?&lt;br /&gt;
&lt;br /&gt;
*Q:  The important part of this sketch is the line where the microprocessor reads the analog input:&amp;lt;code&amp;gt;   val = analogRead(potPin);&amp;lt;/code&amp;gt; Looking at the Arduino help for that function (&amp;lt;code&amp;gt;analogRead()&amp;lt;/code&amp;gt;), what do you think the value &amp;lt;code&amp;gt;val&amp;lt;/code&amp;gt; will be for those highest and lowest voltages at your A_IN pin?&lt;br /&gt;
&lt;br /&gt;
*Q: How can you verify your guess for the previous question?  Come up with a plausible method, and try it out.  Anything goes!  (even using functions next weeks material, like Sketchbook-&amp;gt;Communication-&amp;gt;Graph) If you have a good idea, share it with the class....&lt;br /&gt;
&lt;br /&gt;
* Q: How could you make this more sensitive? There are least three ways to try... think in terms of the physical enclosure around the sensor, the hardware setup (a voltage divider), and the software (look at File-&amp;gt;Sketchbook-&amp;gt;Analog-&amp;gt;Calibration..., specifically the &amp;lt;code&amp;gt;map()&amp;lt;/code&amp;gt; function)&lt;br /&gt;
* Q: Does changing the code make this more sensitive?&lt;br /&gt;
&lt;br /&gt;
=== FYI other sensors ===&lt;br /&gt;
I have some of them here if you want to try them. &lt;br /&gt;
&lt;br /&gt;
==== flex sensor ====&lt;br /&gt;
spectra symbol flex sensor [https://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&amp;amp;krypto=6pWdQhy2AZPZ2sD8W5xEl6aJV6WqDHEGqOKNa%2FdOSS9%2BxO5uYYYPAp%2FlelrGLAWKNyXGozz0WUJ%2B%0D%0APBDIeyVBNlu11KbfyDwz&amp;amp;ddkey=CookieLogon]&lt;br /&gt;
&lt;br /&gt;
==== home made strain gauge ====&lt;br /&gt;
A poor man&amp;#039;s flex sensor.  See page 32 in Forest Mims &amp;quot;Electronic Sensor Circuits &amp;amp; Projects&amp;quot; to make your own.&lt;br /&gt;
&lt;br /&gt;
==== force / pressure sensor ====&lt;br /&gt;
Force Sensing Resistor (FSR)  &lt;br /&gt;
&lt;br /&gt;
[[Image:FSR.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
Voltage returned is proportional to force applied to surface. [http://www.trossenrobotics.com/images/productdownloads/FSR%20data.pdf datasheet]&lt;br /&gt;
[http://www.trossenrobotics.com/store/p/3221-1-5-Inch-Force-Sensing-Resistor-FSR-.aspx purchase]&lt;br /&gt;
&lt;br /&gt;
Good for substantial physical interaction (this project: http://roberttwomey.com/hitme/)&lt;br /&gt;
&lt;br /&gt;
[http://www.trossenrobotics.com/store/c/2670-Force-Sensors-Pressure-Touch-Sensors.aspx more force sensors ]&lt;br /&gt;
&lt;br /&gt;
FlexiForce Sensors:&lt;br /&gt;
http://www.tekscan.com/flexiforce/flexiforce.html&lt;br /&gt;
&lt;br /&gt;
==== IR rangefinders ====&lt;br /&gt;
Sharp GP2D12 INFRA-RED RANGER&lt;br /&gt;
&lt;br /&gt;
[[Image:IR_RANGER.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
&amp;quot;This sensor takes a continuous distance reading and returns a corresponding analog voltage with a range of 10cm (4&amp;quot;) to 80cm (30&amp;quot;). The sensor package includes a JST 3-pin connector, three pre-crimped wires, and a booklet with detailed information and examples.&amp;quot; [http://www.acroname.com/robotics/parts/R48-IR12.html]&lt;br /&gt;
&lt;br /&gt;
[http://www.acroname.com/robotics/parts/SharpGP2D12-15.pdf datasheet]&lt;br /&gt;
&lt;br /&gt;
One of many Sharp Rangers, with different effective ranges [http://www.acroname.com/robotics/parts/sharp_guide.pdf comparison guide]&lt;br /&gt;
&lt;br /&gt;
==== Ultrasonic rangefinders ====&lt;br /&gt;
http://www.acroname.com/robotics/parts/R271-SRF05.html&lt;br /&gt;
range of four meters&lt;br /&gt;
&lt;br /&gt;
==== And more... ====&lt;br /&gt;
See the Homework section.&lt;br /&gt;
&lt;br /&gt;
=== can we sample sound? ===&lt;br /&gt;
&lt;br /&gt;
* That is a good question. &lt;br /&gt;
* We can do definitely do threshold detection: is a sound louder than a certain point.&lt;br /&gt;
* Can we make WAV files?  I Don&amp;#039;t Know...&lt;br /&gt;
&lt;br /&gt;
== Analog Output ==&lt;br /&gt;
Continually varying signals, rather than discrete &amp;quot;steps&amp;quot;. How does a digital microprocessor create an analog output? &lt;br /&gt;
&lt;br /&gt;
PWM, duty cycle, and effective voltage.&lt;br /&gt;
&lt;br /&gt;
=== LED Dimming ===&lt;br /&gt;
*File-&amp;gt;Sketchbook-&amp;gt;Examples-&amp;gt;Analog-&amp;gt;Fading&lt;br /&gt;
The crux of this sketch is the &amp;lt;code&amp;gt;analogWrite() &amp;lt;/code&amp;gt; function.  &lt;br /&gt;
&lt;br /&gt;
NOTE: The function &amp;lt;code&amp;gt;analogWrite()&amp;lt;/code&amp;gt; only works on some digital output pins.  Look up the help for the function, it will tell you which pins work: Digital pins  3,5,6,9,10, and 11.&lt;br /&gt;
&amp;lt;youtube v=&amp;quot;62gWVWCyw_w&amp;quot; loop=&amp;quot;true&amp;quot;/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Image:LED_FADER.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
* It looks like a MacBook napping...&lt;br /&gt;
* Get this working.  Then...&lt;br /&gt;
* Q: Drive this dimming example with the light sensor from before.  &lt;br /&gt;
** use &amp;lt;code&amp;gt;analogRead()&amp;lt;/code&amp;gt; to get the value from the sensor, like you did before, then use &amp;lt;code&amp;gt;analogWrite()&amp;lt;/code&amp;gt; to output the value to the LED.  NOTE: &amp;lt;code&amp;gt;analogRead()&amp;lt;/code&amp;gt; will return values from 0-1023, and &amp;lt;code&amp;gt;analogWrite()&amp;lt;/code&amp;gt; writes values from 0 to 255, so you will need to divide your read value by 4 to get the output value.  Or you could use &amp;lt;code&amp;gt;map()&amp;lt;/code&amp;gt; &lt;br /&gt;
* Q: Does yours turn on when it is light, or does it turn off?  Switch this to give it the opposite behavior, in either hardware or software.  You could do either!&lt;br /&gt;
&lt;br /&gt;
=== Lightbulb ===&lt;br /&gt;
Same as the LED, but with a higher current load: your microprocessor can not source enough current to power the bulb. (Or maybe it can, but you probably don&amp;#039;t want to test it!)  We need to use a power transistor: TIP120. This allows you to control a larger current (the bulb) with a smaller current (digital out from the chip). &lt;br /&gt;
&lt;br /&gt;
[[Image:Lamp_fader.png]]&lt;br /&gt;
&lt;br /&gt;
[[Image:BULB.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Motor ===&lt;br /&gt;
* Basic motor speed control (for a DC motor).  &lt;br /&gt;
* Same circuit as above, swapping the motor for the lamp. &lt;br /&gt;
&lt;br /&gt;
[[Image:MOTOR_SPEED.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Q: Drive it with the input from the potentiometer.&lt;br /&gt;
&lt;br /&gt;
=== Sound/Tone Generation! For Sound People (optional) ===&lt;br /&gt;
An analog output, different from the light dimmer.  To make a varying sound, you would want to change the frequency of the output signal, not the amplitude.&lt;br /&gt;
* This is more like the light blinking from part one, where changing the input voltage will change the rate of the light.  But now you will do it with a Piezo, adjusting the time delay in microseconds. &lt;br /&gt;
* If you like sound, try this: http://www.arduino.cc/en/Tutorial/PlayMelody, I have a piezo you can use.  (Or you can get one at RadioShack).&lt;br /&gt;
* This example adjusts the frequency of the output (tone) not the magnitude. &lt;br /&gt;
* the light fading above (&amp;lt;code&amp;gt;analogWrite()&amp;lt;/code&amp;gt;) adjusts the brightness of the light (magnitude) with PWM.&lt;br /&gt;
&lt;br /&gt;
== Homework ==&lt;br /&gt;
NEW ASSIGNMENT: &lt;br /&gt;
Acquire a sensor of some sort... not one of the ones from your kit.  Could be a pressure, temperature, VOC, range-finder, accelerometer (!!) ... there are lots of options.  Start with some of the links below.  If you need more ideas, look through the web.  Be sure to have your new sensor by next week!! We are going to use them in class, for Serial Communications. &lt;br /&gt;
&lt;br /&gt;
Don&amp;#039;t worry if you don&amp;#039;t know how to make it work: if you are concerned whether your choice is viable, send me an e-mail with a link to your sensor of interest before you get it. &lt;br /&gt;
&lt;br /&gt;
MORE SENSORS:&lt;br /&gt;
* http://www.sparkfun.com/commerce/categories.php?c=23&lt;br /&gt;
&lt;br /&gt;
===A Cornucopia of sensors===&lt;br /&gt;
I gave some examples of sensors in the first part of today&amp;#039;s lab. &lt;br /&gt;
* http://www.acroname.com/robotics/parts/c_Sensors.html&lt;br /&gt;
* Very good for interactive artworks!&lt;br /&gt;
* What else looks interesting?&lt;br /&gt;
** temperature&lt;br /&gt;
** pressure&lt;br /&gt;
** VOCs (Volatile Organic Compounds) [http://www.synkera.com/pdf/Synkera%20VOC%20Data%20Sheet.pdf] (see Natalie Jeremijenko&amp;#039;s Feral Robotic Dogs: http://www.nyu.edu/projects/xdesign/feralrobots/)&lt;br /&gt;
** Hall Effect sensor&lt;br /&gt;
&lt;br /&gt;
===Actuators, for future reference===&lt;br /&gt;
&lt;br /&gt;
[[Image:SERVO.JPG|400px]] &lt;br /&gt;
&lt;br /&gt;
Servo&lt;br /&gt;
&lt;br /&gt;
[[Image:SOLENOID.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
Solenoid&lt;br /&gt;
&lt;br /&gt;
Stepper Motor&lt;br /&gt;
&lt;br /&gt;
Cellphone buzzer (I have one here)&lt;br /&gt;
&lt;br /&gt;
[[Image:Buzzer.JPG|400px]]&lt;br /&gt;
&lt;br /&gt;
AC appliances with a relay (!!!!CAUTION CAUTION CAUTION!!! get input from me before you try anything VERY DANGEROUS!!!!) (think dancing pixar light) &lt;br /&gt;
&lt;br /&gt;
Anything that moves, blinks, has activity, and runs off electricity... ?&lt;br /&gt;
&lt;br /&gt;
== BONUS ==&lt;br /&gt;
Cadsoft EaglePCB - the program I have been using to make these schematics. http://www.cadsoft.de/download.htm&lt;br /&gt;
&lt;br /&gt;
If you want to get a headstart on the future, download this software.  It is free.  You can use it to design circuits, from schematic to layout to fabrication.  (FYI It is also installed on the lab computers)&lt;/div&gt;</summary>
		<author><name>Mchoy</name></author>	</entry>

	</feed>