node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »


webduino Build Status

Arduino control over http

Getting Started

Install the module with: npm install webduino

var webduino = require('webduino');
webduino.awesome(); // "awesome" 


(Coming soon)


(Coming soon)


In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

(Nothing yet)


Copyright (c) 2014 Ernesto Laval
Licensed under the MIT license.


RESTful API for controlling and reading devices sensors and actuators connected to an Arduino Borad through an HTTP Connection.

It is buit on top of a great set of modules:

Nodejs - Javascript on the server!!

johnny-five - Communication to Arduino boards in node

express - Web server (API & local web pages) - Get events from sensors of change in state through an http connection

Created by TIDE SA for the support of Makers Movement in Schools.

Quick start


Get an Arduino (tested on Arduino UNO) and connect to your computer through USB


If you don't have it already ... install node on your computer.


Create a new directory and install webduino module with nmp

$ mkdir myfirstwebduino
$ cd myfirstwebduino
$ npm install webduino

Make sure your Arduino is connected to a USB port and run a webduino server

$ mkdir myfirstwebduino
$ cd myfirstwebduino
$ npm install webduino

Create your server program - server.js

var webduino = require('webduino');
var webduinoApp = webduino();
var server = webduinoApp.server();
var PORT = 8000;
webduinoApp.on("ready", function() {
  // On board ready, start listening for http requests 
  server.listen(PORT, function() {
    // Notify local IP Addrsss & PORT 
    var IP = webduinoApp.localIPs()[0];
    console.log("Listening on "+IP+":"+PORT)

And run it

$ node server
1388687348931 Board Connecting... 
1388687348939 Serial Found possible serial port /dev/cu.usbmodemfa131
1388687348941 Board -> Serialport connected /dev/cu.usbmodemfa131
1388687352124 Board <- Serialport connected /dev/cu.usbmodemfa131
1388687352124 Repl Initialized 
>> Listening on

Try it

In a Web Browser (on any computer from your local network) try the following urls to get the state of Pins, Leds or Sensors

  • http://{server address}/api/leds
  • http://{server address}/api/leds/13
  • http://{server address}/api/sensors
  • http://{server address}/api/sensors/A1
  • http://{server address}/api/pins
  • http://{server address}/api/pins/7

Complete API Docs

The complete API docs can be found here