Do you have trouble sleeping at night? Are you always stressed out or paranoid? Does the dark scare you? If yes is the answer to any of those questions, look no further because we have the product for you.
RGB eyes night light is the best way to light up your night! Put this our product on your bedstand as this product fades through the full-color spectrum giving your room a soothing ambiance. It will help you relax and let you fall asleep with no worries. If any danger comes around and disturbs the night light by turning over, it triggers the tilt switch turning the fading light off waking up the user letting him or her know danger is nearby.
This product is based on design #5 (fading lights project) and was constructed using a generic breadboard, jumper wires, an LED light, a tilt switch, and a 10k ohm resistor.
In this process, we ran through two prototypes, the first using an external LED that could be placed in the breadboard and the second using the LED in the launchpad itself.
We ultimately decided to opt for the prototype with the LED on the launchpad to optimize our design for minimal parts and overall cost.
Our design uses Energia to make, upload, and program the launchpad LED to fade and change colors. When designing our code, we first focused on creating a loop that causes the LED on the board to go through 7 different colors (red, orange, yellow, green, aqua, blue, purple, and pink). The loop also follows their wavelengths by changing the RBG values slowly to appropriately transition between each color seamlessly and allows for the whole color spectrum to be covered. We delayed each change in the light to allow for a gradual change in the colors and so it wouldn't change the colors to quickly
Once we got that all sorted out, we added in the tilt switch into our design by having a source of electricity leave to the launchpad, pass through the tilt switch on a breadboard, and then back into the launchpad. We coded a conditional that determines whether or not the tilt switch is tilted based on the voltage that was able to pass through the breadboard. If the switch is tilted then the lights turn off for the user, but when level, the LED fades colors evenly.
With everything done, you get the RGB Eyes Night Light!
Comments
Please log in or sign up to comment.