LED Project - Das Blinkenlights
Aesthetic view of my breadboard. |
My project features a total of 12 individually addressable LEDs, two buttons and 12 resistors to protect the LEDs from over-current. My project runs two simple 'for' loops that increment between pins 2 and 13, the loops will turn on one LED, turn it off again and then repeat with the next LED addressed by the next pin, this gives an illusion of the light bouncing up and down on the breadboard.
The buttons come into play by adjusting the delay between turning an LED on or off by 20 millisecond increments. The red button (pin A1) will add 20ms to the delay, slowing down the light cycle and the green button (pin A0) will remove 20ms from the delay, with a minimum of 20ms as not to stop the cycle altogether.
Top down view of my project. |
Fritzing Breadboard View |
Fritzing Schematic View |
Demonstration video
Code used in project |
Reflection!
Q: Where did you get the idea from?
A: I originally wanted to have a proximity sensor with a scale displaying the reading, that would have ranged from red being close to green being far, after arranging the LEDs I thought that idea would be better saved for a later project. I left the LEDs in place and wrote a program to test them all, that evolved into the final project.
Q: What was hard and easy?
A: Building the project itself was somewhat simple, the program was basic enough to not cause too much stress, however building the project in Fritzing caused a number of crashes on my system.
Q: Did you have enough time to finish?
A: Ample time! Had plenty of extra time to experiment with the programming and layout.
Q: What would you do differently next time?
A: Bigger breadboard! More blinkenlights!
Q: Could this project be extended?
A: Absolutely, you could easily add functions, buttons or more LED's to this project given you have the available pins on your arduino.
Q: Did you have to learn anything new?
A: I learned that pins 0 and 1 are reserved for software flashing, this can cause some issues when updating your code while using those pins.
Notes:
Using analogue inputs for buttons can be a little testy, some bad readings due to nearby EMI can cause the delay to change without user input.
Using analogue inputs for buttons can be a little testy, some bad readings due to nearby EMI can cause the delay to change without user input.
The buttons use a reference to ground due to a lack of pins available on the breadboard and the physical size of the buttons.
The last red LED on pin 13 shares that pin with the onboard LED, this can make for an undesired flash once the loop hits pin 13 and can be distracting from the illusion.
Daisy the cat seems uninterested by my gadgets.
Daisy the cat seems uninterested by my gadgets.
Comments
Post a Comment