When you instanciate a Nusbio object, you can also request your application to start a local web server listening to a specific port.



The web server will run in background respond to the following urls:

  • Nusbio device state
    http://localhost:1964/nusbio/state
    
  • Gpio on, off and state
    http://localhost:1964/gpio/0/high
    http://localhost:1964/gpio/0/low
    http://localhost:1964/gpio/0/state
    
  • Gpio on, off for multiple
    http://localhost:1964/gpio/0,2,4,6/high
    http://localhost:1964/gpio/1,3,5,7/high
    
  • All gpio
    http://localhost:1964/gpio/all/state
    http://localhost:1964/gpio/all/low
    http://localhost:1964/gpio/all/high
    
  • Blink api
    http://localhost:1964/gpio/1/blink/100/0
    http://localhost:1964/gpio/2/blink/200/0
    
  • Double blink api
    http://localhost:1964/gpio/1/blink/100/50
    http://localhost:1964/gpio/2/blink/200/50
    

Web App

You can also build web application with any framework that can control Nusbio gpio pins using the web api via the JavaScript library Nusbio.js and jQuery.