Goal: switch on/off a LED through HTTP calls.
First test app to try to trigger Raspberry GPIO pins through API calls.
- Install PiPiper with sudo privileges
- Git clone
- Bundle install
- Connect LED to GPIO PIN
#17
If you want to access your server from another device (ie: from your phone, which is cool!), you have to start the Rails server on port 80
and allow any ip address:
rbenv sudo rails s -p 80 -b 0.0.0.0
Switch on LED:
https://<raspberry_ip>/led/on
Switch off LED:
https://<raspberry_ip>/led/off