Skip to content

lucasdavila/bmo-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

left

bmo-api

bmo-api provides a simple web api to interact with your arduino.

setup

  • clone this repo
  • $ bundle install
  • $ RACK_ENV=production bundle exec ruby api.rb

API

leds

  • /leds/on/:pin, eg:
    $ curl 0.0.0.0:4567/leds/on/13

  • /leds/off/:pin, eg:
    $ curl 0.0.0.0:4567/leds/off/13

  • /leds/fade_in/:pin, eg:
    $ curl 0.0.0.0:4567/leds/fade_in/11 -X PUT -d ''
    $ curl 0.0.0.0:4567/leds/fade_in/11 -X PUT -d sleep=0.5

  • /leds/fade_out/:pin, eg:
    $ curl 0.0.0.0:4567/leds/fade_out/11 -X PUT -d ''
    $ curl 0.0.0.0:4567/leds/fade_out/11 -X PUT -d sleep=0.5

  • /leds/fade/:pin?to=100, eg:
    $ curl 0.0.0.0:4567/leds/fade/11 -X PUT -d to=100

Contribute

Want to help? Just send a pull request :D

About

Simple web api to interact with your arduino :D

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages