Description
This program was written to be run on a raspberry pi however I did debug it on a macbook pro using the webcam and that seemed to work fine as well
- It may be wise to give your hue bridge a static ip on your network
- Download and install raspbian to an sd card using etcher or some other tool.
- Mount the sd on your computer. In the root create a file named
ssh
- Create another file in the root of the card named
wpa_supplicant.conf
and add the following snippet. Change your ssid to your network name and psk to the password for your network.
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid=""
psk=""
key_mgmt=WPA-PSK
}
- Put the sd card in the pi and plug it in so it boots.
- ssh into the pi with
ssh pi@raspberrypi.local
the default password israspberry
- run
sudo raspi-config
- Enable VNC, change the password, and change the hostname of the pi
- Exit ssh
- Log into the pi via VNC
- Take a sample image via command line using
raspistill -o ~/Desktop/test.jpg
- Make sure the image appears.
- Simply copy this repo to the pi using vnc viewer OR cloning the repo on the pi itself.
- In the directory of the program, run
pip3 install -r requirements.txt
- Using the info from config description below. Setup config.py for your configuration.
- Run the program in config mode (Debug = True, Blink_on = False)
- Make sure that the image lines up with the display you will be sampling
- Turn (Debug = False, Blink_on = False) d
- Download Blynk from the app store
- Create a new project and copy the key into config.py
- Add a button and set it up with the virtual pin in your configuration
- Turn blink_on = True
This program was written to be run on a raspberry pi however I did debug it on a macbook pro using the webcam and that seemed to work fine as well
If you have the raspberry pi gui running run the program in debug mode and adjust / re-run the program config as needed.
If you are not using the raspberry pi gui, set debug_gui = False
in the config.py file. Then run the program. This should
take an image and then exit. View the image and then continue to run the program and tweak the config as needed until the settings are
to your liking
docker run --rm -it --name pi-tv-colorchange $(docker build -q .)