rodi-web ======== A web-service interface for Gary Servin's RoDi (Robot Didáctico inalámbrico) wireless robot. Allows programmers to control RoDi by simply using HTTP requests, ie., from a web browser, a bash script, and basically any programming language. API ---- * Blink ``` GET /1// ``` ie., ``` curl --get http://192.168.4.1:1234/1/1000/ // blink each second curl --get http://192.168.4.1:1234/1/0/ // stop blinking ``` * Sense ``` GET /2/ ``` Returns a JSON formatted array of two integers, for left and right sensor values. ie., ``` $curl --get http://192.168.4.1:1234/2/ [62, 66] ``` * Move ``` GET /3/// ``` ie., ``` $curl --get http://192.168.4.1:1234/3/0/0/ // stop $curl --get http://192.168.4.1:1234/3/100/-100/ // turn right $curl --get http://192.168.4.1:1234/3/-100/100/ // turn left $curl --get http://192.168.4.1:1234/3/100/100/ // forward $curl --get http://192.168.4.1:1234/3/-100/-100/ // backward ``` 100 moves wheel forward at full speed -100 moves wheel backward at full speed * Sing ``` GET /4// ``` ie., ``` curl --get http://192.168.4.1:1234/4/31/250/ // Play a note for 250ms ``` Notes can be found in http://arduino.cc/en/tutorial/tone * See ``` GET /5/ ``` Returns a JSON formatted integer, for the distance in centimeters. ie., ``` $curl --get http://192.168.4.1:1234/5/ 13 ``` * Pixel ``` GET /6/// ``` Set the color of the onboard RGB led (pixel) ie., ``` $curl --get http://192.168.4.1:1234/6/0/0/0/ // off $curl --get http://192.168.4.1:1234/6/255/0/0/ // red $curl --get http://192.168.4.1:1234/6/0/255/0/ // green $curl --get http://192.168.4.1:1234/6/0/0/255/ // blue $curl --get http://192.168.4.1:1234/6/255/255/255/ // white ``` * Sense Light ``` GET /7/ ``` Returns a JSON formatted integer, for the light intensity level (0 - 1023). ie., ``` curl --get http://192.168.4.1:1234/7/ 66 ``` * Led ``` GET /8/ ``` Turns the onboard led on or off. ie., ``` curl --get http://192.168.4.1:1234/8/0/ // turns the onboard led off curl --get http://192.168.4.1:1234/8/1/ // turns the onbboard led on ``` * Battery ``` GET /9/ ``` Returns a JSON integer, for battery charge value in miliVolts. ie., ``` $curl --get http://192.168.4.1:1234/9/ 3700 ``` Authors ---------- * Martin Abente Lahaye - tch@sugarlabs.org * Gary Servin - garyservin@gmail.com Cool Stuff ------------------- I recommend Turtle Blocks Javascript as a client for RoDi-web. Grab the latest bits from https://github.com/walterbender/turtleblocksjs. Don't forget to load the RoDi plugin!