Control color and intensity of led strips in a hallway to match optimal human circadian rhythm. Arduino and python interface to custom electronics for 200W RGB leds.
Raspi, Arduino Pro Micro 5V/16MHz (but it is a hazzle to program from commandline), RGB leds with common anode and 3 n-channel mosfets rated at ~10A that switch on at 5V, e.g. the STP16NF06 (but a true logic level mosfet would be better). Make sure the electronics can work with high currents and use beefy connectors (e.g. http://www.jst-mfg.com/product/detail_e.php?series=262) etc.
Followed instructions from http://thomasloughlin.com/connect-raspberry-pi-to-arduino-using-the-usb-cable/
sudo nano /boot/cmdline.txt
- delete
console=ttyAMA0,115200 kgdboc=ttyAMA0,115200
sudo nano /etc/inittab
- comment out
#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
- reboot
Quick and dirty:
- Connect the lights and the Arduino and then the Arduino to the raspi.
- Download the repo on the raspi.
- Set up crontab to set the different modes with e.g.
python send_serial_command.py --evening
starting at 19.00 etc. - Make sure the raspi updates its time automatically using e.g. NTP.
- Take serial commands from python with color and animation time, animate to that color in the given time.
- Deploy to raspi using Docker.
- Put color command in python rather than in arduino, have python command that sets color for circadian rythm depending on time of day.
- Broadcast state to online service.