Controlling a circuit of rgb leds in a lamp to show average color of the windows in the Telefonplan Tower from a webcam image using a RaspberryPI and Python. When a significant change of the average color happens the lamp animates to the new color. Also runs a simulation of lamp color, input colors and enhanced webcam image for testing purposes.
Python 3.5, pillow, pi-blaster, requests, Docker, docker-compose
Run tests with this command:
cd pi-tower-lamp
python -m unittest tests
The program can be run in visual mode for developing and debugging and in rgbled mode to control rgb leds.
- Install pi-blaster (https://github.com/sarfata/pi-blaster or my fork that works with gpio pins 2, 3 and 4 from https://github.com/mik4el/pi-blaster).
- Make local copy of
.env.sample
to.env
and fill in. docker-compose up -d
cd pi-tower-lamp
python main.py --mode visual