ERU: Riding Safely, in progress

Creating bicycle indicator lights using our Arduino boards involves combining a few basic concepts. We developed our code and circuit design by taking elements from a few of the example programs found on the Arduino website. First we used “Blink Without Delay” to get the code for blinking an LED without having to pause the entire code. Secondly, we used “Button” to learn how to control an LED with a button. Finally, we incorporated code from “Button State Change” to be able to count the number of button pushes. This way we can have multiple light settings and cycle through “off”, “blinking”, and “stay on”.

We have successfully gotten a button to control 3 LED’s in parallel, and loop through the off, blinking, and staying on states.

By creating the circuit we learned some inner workings of the basic button included in the Arduino starter pack. Through some problem solving, we learned that different coloured LEDs have different resistances. This means that connecting multiple colours in parallel might result is some LEDs not turning on. Lucky for us, we only want to use red LEDs, which conveniently are one of the most efficient colours!

We are currently trying to get a second button working, so that we will have both left and right lights. Our next step is to get the two buttons working simultaneously, and then try and take our circuit from the breadboard to real life! We are also considering replacing the larger board with an ATtiny: an 8-pin chip which is able to perform the same code that we put on our larger boards.
Alex & Carolyn
Posted in Blog, Electronics for the Rest of Us! Tagged with: ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*