Night-Light
I made a fun Nightlight that has a variety of colors, that can be easily controlled by a potentiometer. The colors that the nightlight can produce are: Red, Blue, Orange, Yellow, Green, Jade, Pink, Indigo, Cyan, Purple, and White. To switch between colors, simply turn the knob on the potentiometer. If you turn the knob all the way to the right, it will turn off.
Once you stop on a color, the nightlight will pulsate, getting slowly lighter and darker, continuously until you pick a new color.
There is an model example below, along with the Circuit Python Code :
Supplies
- Circuit Playground Bluefruit, by Adafruit
- https://www.adafruit.com/product/4333
- Stemma YFRobot Potentiometer
- https://www.adafruit.com/product/4493
- NeoPixel Digital RGBW LED Strip Lights
- https://www.adafruit.com/product/2824?length=1
- Any sort of semitransparent cup
- A box to hold the gadgets (I used a tissue box)
- *Cotton balls if desired
Attach your potentiometer to you CPB.
Black Wire -> GND
Red Wire -> POWER
White Wire -> Data/Board (Here I used A3)
Attach your LED wires to your CPB.
Black Wire -> GND
Red Wire -> VOUT
White Wire -> Data/Board (Here I used A1)
Find a cup, and cover the inside with some sort of semi-transparent material (printing paper works fine).
Find a suitable box, and cut a hole, about a half inch smaller than the opening of your cup.
Begin weaving the LED lights through the hole in your box, and then put them in your cup.
Make sure all LEDs are inside the cup. Make sure to pull the potentiometer through the opening in the box. Finally, put all gadgets within the box, and close up the back.