Digital Input and Output aka Blinking Lights!

Posted: September 19th, 2010 | Author: genevieve | Filed under: PhysComp | 1 Comment »

So, my first lab assignment for Physical Computing was to wire up a breadboard with a switch, two LEDs, and program the board to toggle between the switches.

view of arduino and breadboard with switch and LEDs

here's my circuit, ready to go!

I had my circuit all set to go, verified my code and everything. However, when I uploaded the code to the microcontroller, I got a strange error message that read: avrdude: stk500_recv(): programmer is not responding. There was also a blinking yellow light on the Arduino that seemed upset. And the lights on my breadboard were definitely not lighting up.

Arduino Error from Genevieve ITP on Vimeo.

So, a helpful ITP student came to my rescue. After a bit of troubleshooting, Paul realized that my board was still set to Diecimila, and I’d forgotten to change the setting for this newer board.

paul taking apart my circuit for troubleshooting

paul dismantles my circuit to try and figure out what's going on

So, with that problem solved, I rewired my circuit, uploaded the program to the Arduino, and was in business:

Arduino Digital Input / Output Success from Genevieve ITP on Vimeo.

So, for the “Getting Creative” part of the assignment, I decided to keep my output the same, but make a switch out of some safety pins. Originally, I wanted the switch to be “on” when the safety pin was closed, but then I realized that the whole body of the pin was already connected, so the switch would always be on no matter what. Either that, or it would short circuit, so opted for Plan B.

arduino board, with safety pin switches that control red and green LED

here are my safety pin switches. well, i guess together they make up just one switch...

I wrapped some wire around the end of the switches, and plugged the other end of the wire back into the breadboard in the same places as either side of the original switch. That was pretty much it. But feel free to take a look.

Safety Pin Switches from Genevieve ITP on Vimeo.

Oh yes, and here’s a link to the code, as well as the simple steps I followed.


One Comment on “Digital Input and Output aka Blinking Lights!”

  1. 1 Tom Gerhardt said at 1:50 am on September 20th, 2010:

    thank the lord for random ITP student helpers…

    and its a shame that safety pin switch doesn’t work, that probably would have been really satisfying.


Leave a Reply