Creative Switch

I programmed a switch in which, when pressed, the LED’s will blink from Red to Green to Blue to Yellow, holding on each light for 6 seconds. While using a millis code would have made it possible to stop the sequence midway through, I am not familiar enough with Arduino coding yet, although I think I have a rough idea of how it works after reading the article.

My initial issue with the current code (that I mentioned via e-mail) ended up being a wiring issue. I was accidentally putting twice as much power into the system as needed and was also causing a kickback into the computer whenever the button was pressed, which crashed it. This was easily solved once the mistake was realised (and now I have a better idea of how to wire in future). I was also wiring the button through pin 13, which I switched to pin 12  so it didn’t control the LED on the board. Initially the button could only turn off the lights, but the re-wiring made sure that pressing the button meant the sequence could be initiated. Surprisingly my code ended up being reasonably solid and, having coded it myself from scratch, I am more confident moving forward with Arduino’s language and will therefore be able to look at more complicated things.

To make the switch “creative,” I wanted to use everyday objects around my room in a practical way. I ended up using a ‘Coaster Switch’ in which a wire is attached to a Coke can and another attached to a coaster made of aluminium. When the coke can is put on the coaster, the light sequence is activated.

One thought on “Creative Switch”

  1. This documentation could be a lot better. Please post video, pictures, etc. from now on. Tell the story of how your project developed not only in words. Take pictures/videos every step of the way. The one picture you have posted here is quite low quality.

Comments are closed.