Week 8: Output Devices

This week we were supposed to implement an output device. I chose to keep working with RGB LEDs and start working on a design for the heads of my glow staff that I plan to make for my final project. This time I tried to make an array of RGB LEDs with different effects. I designed a new board in Eagle that incorporated 4 RGBs this time instead of just the one. I changed some of the connectors to better fit the circuit which would probably be powered by regular batteries. I put the connection for power and the programming header towards the bottom so that they could be accessed to change batteries and possibly program new light sequences. I tried to make this new circuit with the copper sticker and the vinyl cutter, because I was considering putting my circuit onto a small cylinder and then casting a clear rubber around the circuit to make the head of the staff and diffuse the light. However, even after several tries, the circuit didn't come out well. Perhaps, I'll just make a small regular board to fit inside the head instead. I also updated my code to include a few different light patterns: rainbow_fade, fire_fade, white_blink, blue_solid, and green_blink. The idea will be that you can press the button to cycle through the five different patterns and off. I forgot about the fact that in order to have the button cycle between different states, I would need to implement a button debouncer. So currently, what I have is a device that when the button is pressed, pseudorandomly chooses one of my programmed sequences depending on how many times the code cycles through the main while loop while the button is being depressed and then outputs that on the LED, which is in fact an output device. I plan to implement the button debouncer next week since that's really more of an input device anyway.