Welcome to Dog Pushbutton from Capstone Fall 2021 Team. This is repository contains designed piece of software for Dog pushbuttons.
- Receive command from pushbutton though Raspberry Pi GPIO
- Send alert to mobile and computer via Pushover
- Play sound though Raspberry Pi output headphone port
Client: Professor Karen Beiter
Lead Technician: Sahand Nowshiravani
Assistant Technician: Luca Jones
- Update Raspberry Pi OS and Python
sudo apt update && sudo apt upgrade
- Install Pushover for Python, gpiozero and PyGame modules from Python package manager:
python -m pip install -U python-pushover gpiozero pygame
- To create startup in GUI. Add line on /etc/xdg/lxsession/LXDE-pi/autostart:
@lxterminal -e /home/pi/DogPushbuttons-main/startup.sh
If you preferred startup in headless or commandline intead of GUI: Click here.
-
Sign up Pushover and create application for API token and User token.
-
Download zip of this repo for Raspberry Pi:
- Edit the script with new API token and User token. Example:
client = Client("us7vsksv12zazdf6hwu2dt8a4wy743f", api_token="afdsfsdfwzxczt1426xjnp1waj4")
On Raspberry Pi with pushbutton switches
python main_pi.py
On PC with keyboard
python main_pc.py
If you got Pygame error such as "No Mixer module found". Try this:
sudo apt-get install git curl libsdl2-mixer-2.0-0 libsdl2-image-2.0-0 libsdl2-2.0-0