Monday, January 13, 2020

LEDs - let's flash some lights!

I used six LEDs for this project, with the Arduino I created ~30-second sequence. I used the 5V output powering the Arduino with my laptop. Using the pins 5-10 to power the breadboard and the individual lights. For reference, all warm-colored cables are positively charged and cool colors are negatively charged.

My circuit board
closes ups of the wiring.

This part was pretty straight forward from our class practice. Powering each LED with its own pin that then has its own resistor. To make a somewhat symmetrical layout I powered both sides of the breadboard with the red and black jumpers as seen in the top image. 

The code was a bit trickier, not in the actual turning on and off (HIGH/LOW) of the LEDs but the code itself is long and clumsy looking. There are probably better ways to turn off and on full sections of LEDs all at once as I have in the code posted below but in better shorthand, maybe an array?

 Although the code is bulky, I am pretty happy with how the sequence itself turned out.



No comments:

Post a Comment