A simple controller app that allows you to play video files on triggers and stream segments to another rasbperry pi over serial.
This software is bespoke to unicorn hats and a 32x16 image size
This setup does not cover installing the unicorn hat library, please install the one for python3!
To install run the following in terminal within the repo directory
sudo apt-get update
sudo apt-get upgrade
sudo chmod +x setup.sh
sudo ./setup.sh
sudo python3 -m pip install -r requirements.txtEdit the config.json files and assign expressions to the pins you want to trigger them, do note that these pins are the BOARD pins and not GPIO numbers!
Run the program on the master Pi with the following
sudo python3 main.pyAnd run the slave program on the slave pi with the following
sudo python3 main.py -slaveYou should see a yellow line with a breathing white rectangle in the middle if all is good.
You can now drag video files into the "expressions" directory and name them EXACTLY the same as they appear in the config.json in "Expression_pins" (excluding extension). E.g. "Eyeroll.mp4". You only need to upload files to the master Pi and NOT the slave Pi and you will need to restart the app every time you make changes to the config.json file or upload new expressions!
For more settings please look at the comments within the config.jsonc file
To run either script when the system starts up edit the following file with
sudo nano /etc/rc.localAnd enter the following before the exit command. Remove the "-slave" argument if running on master, remember to keep the '&' symbol at the end!
sudo python3 /home/pi/RoboNeoController/main.py -slave &Note: change the path to wherever you have placed the script along with the main.py if you don't put this in your home folder
It should look like this
