An extra GPIO Button to restart HomeDisplayPi if it's stuck or doesn't work properly.
- Connect your button as described below
- Install and use HomeDisplayPi
- Clone this repository (just download it if you haven't installed git)
git clone https://github.com/NullPointerExceptionError/Restart-Button-for-HomeDisplayPi.git
- Navigate into the Restart-Button-for-HomeDisplayPi folder
- Create and activate virtual environment
python3 -m venv venv source venv/bin/activate - Install dependencies
pip install -r requirements.txt
| GPIO- | PIN on Raspberry | port on device | device |
|---|---|---|---|
| 8 | GPIO-14 (TXD) | upper left pin | button |
| 6 | GND | lower left pin | button |
Take the rest of the HomeDisplayPi Readme.
- Activate virtual environment in the HomeDisplayPi folder
source venv/bin/activate - Start the program
If you want to have a log file with errors, use the following command instead (also possible via ssh).
python3 main.py &nohup python3 main.py > output.log 2>&1 &
- Press the button to restart HomeDisplayPi.
To stop the program use
ps aux | grep main.py
kill -2 <PID>replace <PID> with the far left number of the correct process (something like main.py).