Emergency function to stop robot control services and turn off RaspberryPi remotely
-
Python 2.7 or 3.6 Download Python interpreter here.
-
Raspberry Pi 3 Model B Learn more about RasberryPi project.
-
Clone the repo
$ git clone https://github.com/Caveirao/Killswitch.git $ cd Killswitch/
-
Create Python Virtual Environment
$ virtualenv env --system-site-packages
The
–system-site-packages
flag is optional, but by adding it, it allows you isolated environment to access your globally installed packages on your root install, so thing’s like the RPi.GPIO library and such so I find it’s a good idea to add it. -
Enable Python Virtual Environment
$ source env/bin/activate
-
Install the pip-installable dependencies
$ pip install -r requirements.txt
-
Run the Killswitch
$ python app.py
-
Locally, navigate to http://localhost:8080 or remotely http://your_raspberrypi_ipaddress:8080 to access the service; click in the red button to turn off RaspberryPi.