This app requires WiringPi or one of the alternatives so that it can use the gpio
shell command.
Also, it depends on RubyGems managed by Bundler. Run:
$ bundle install
The pins which the app fires are configured with pins.yml
.
$ cp pins.yml{.sample,}
$ vim pins.yml
$ ./app.rb -e production
$ curl -XGET http://localhost:4567/
$ curl -XPOST http://localhost:4567/ -d ''
$ curl -XDELETE http://localhost:4567/
Here is an example:
(Drawn with Circuit Diagram)