RPi GPIO Automation Interface, to implement design pattern for RPi GPIO.
This repository provides GPIO interface for RPi. Also implement "State" Design Pattern so that we can implement FSM easily for RPi systems.
-
Fork this project and modify
__main__.pyfor the main flow of the machine. -
Modify
context.pyandstates.pyto describe the state machine. -
Modify
.env.templateto describe how to add env variables to each machine. -
Modify
gpio_config.ymlto describe how many ports are used. -
Generally,
gpiodoes not need to be modified.
ssh-keygenAnd then bind .ssh/id_rsa.pub to your GitHub account.
git clone <your-repo-link>python3 -m venv env
source env/bin/activate
pip3 install -r requirement.txtcrontab -eThen select nano as your default editor.
Paste command in cronjobs.txt and modify to your likings.
cp .env.example .env
nano .env