This course will become read-only in the near future. Tell us at community.p2pu.org if that is a problem.

Lights! Camera! Action!


Develop a program to control multiple lights!

WITH YOUR OWN ARDUINO

Attach lights to two different pins.  Make sure that electricity travels from the pin, through a resistor and LED, and then to a GND pin.

Download the Arduino software
 and have it unzipped in an Arduino folder.

Plug the Arduino into your computer.  The board will light up, and if this is the first time it has been connected, your computer will install drivers.  You may need to select a driver from inside the folder.

From the Tools menu, select the right board. Also select the right serial port for your Arduino. If you're not sure which serial port to select, unplug the Arduino and see which port disappears from the list.

Write your program to blink one of the lights and click Upload.


Suggestions and Troubleshooting:

-- If your computer displays an error message saying it fails to upload, hold down the Reset button on the Arduino and try again. If it continues to fail, do a Google search for your error, including the word 'Arduino'.

-- If the program is running but your LED is not turning on, plug the wire which would go into pin 3 into the 5V pin and connect the other end to the positive end of the LED.  If the circuit below doesn't light up, even a little bit, try reversing the LED.

 



-- If the LED is especially weak, or does not light, you might want to switch the resistor in your circuit.  Fewer Ohms = less resistance = brighter light.

-- You can connect one of the Arduino's main GND pins to a row, and then end both LED circuits in that GND row, like this:

 



 

WITH CROWDBOT

Look at the sample program on http://mapmeld.appspot.com/crowdbot to see where each light is attached.  Here is what it looks like.

Crowdbot photo

 

To complete this step:

-- Control an LED to blink on and off

-- Add another LED to the sequence

-- Change the timing on the LED light show

Task Discussion


  • Nicholas Doiron said:

    If you don't have an Arduino ( hopefully you have one in the mail! )  you can submit a program and see whether it works on CrowdBot.  Whenever the livestream is on, you can watch your program run on an Arduino.  Submit a program or write a comment on this task page if you would like to schedule a time to use CrowdBot.

    on Dec. 18, 2011, 9:59 p.m.