'Onboard' Web Service

Examples of web service requests as URLs, forms (both GET and POST), and interactive webpage to query Academic RIO onboard sensors and system state as well as to set the state of the onboard LEDs.

Request system status: Hover your cursor over each link to see the complete URL:
system_date
system_time
system_date_time

Request system status and set onboard LED state: Request string in "GET HTTP" format appends the requested state of the onboard LEDs as a hexadecimal code representing the desired state of the four onboard LEDs. For example, 0 means all LEDs off, 1 means LED0 is on while the others are off, 8 turns on only LED3, and F turns on all LEDs:
system date_time_LEDs?LEDhexcode=0
system date_time_LEDs?LEDhexcode=1
system date_time_LEDs?LEDhexcode=8
system date_time_LEDs?LEDhexcode=F

Form-based request with GET method: Enter the LED hex code and click "Submit." Observe the URL of the landing page in your browser after you click the button and you should see the same of name/value string appended as above:

LED hex code:

Form-based request with POST method: The "POST HTTP" method transmits user information directly instead of by the URL; note the difference in the URL after you click "Submit":

LED hex code:

Request JSON machine-readable string:

LED hex code:

Webpage with interactive control: Jump to the interactive control page to see how a relatively simple JavaScript can make the webpage interactive.