This is my colour-changing bed lamp.
It is powered from USB and can cycle through a selection of pleasing colours with the press of a button. There are also some different soothing animations.
The model is designed to slip onto my headboard but the FreeCAD source is included so you can change it to suit.
The software works as follows:
In lamp mode (the default), the lamp cycles through three different colours. These are:
White, Red (to save your eyes when you're half-asleep) and orange (appears to be yellow, but meh!).
Long-pressing the button selects timed mode. The lamp will stay on for five minutes with the currently selected colour before slowly fading to black. To reset the timer, short-press the button and it will stay on for another five minutes.
Long-pressing from timed mode selects rainbow mode. I'm not sure what practical purpose this serves but it does look quite cool.
A final long-press switches the LEDs off. Be aware, the Arduino will still be running and I have no idea of current consumption of the circuit in this mode.
More pictures will be coming soon.
Hardware:
1 Arduino Pro Mini
1 SPST rocker switch
1 Micro USB Breakout board
A short length of WS2812 LED string
1 6x6x6 Tactile Push-button
Some wire. I used the varnished copper wire from a transformer and melted the varnish from the portions I needed to solder before tinning them appropriately.
Software:
Arduino sourcecode, including a PlatformIO project to use with your IDE of choice is provided, which in my case is VSCode.
태그
모델 소스
