node-webduino
node-webduino copied to clipboard
A web FrontEnd for Arduino
node-webduino
A web FrontEnd for Arduino. Real-time I/O monitoring and controlling in your browser.
Installation
See http://nodejs.org on how to setup Node, NPM and CoffeeScript, then clone this repository and prepare it for use with:
$ git clone https://github.com/coopermaa/node-webduino
$ cd node-webduino
$ npm install
Upgrade socket.io of the socketstream dependency package. There is a bug "can't set headers after they are sent" in socket.io < 0.9.15, so we have to upgrade socket.io.
cd node_modules/socketstream
npm install [email protected] --save
Note the lastest socket.io seems not compatible with socketstream.
Usage
Upload Standard Firmata to your Arduino. Better to change samplingInterval from 19ms to larger, for example 50ms. For Arduino Mega, 100ms is sugggested.
int samplingInterval = 50;
You'll need to adjust the name of the serial port to match your setup in the
file app.coffee
, then start the server using either of these:
$ coffee app.coffee
$ nodemon app.coffee
Then point your browser at http://localhost:3000/.
Here is a screencut of node-webduino for Arduino UNO:
Dockerized node-webduino
Suppose your Arduino is on /dev/ttyS1, then save the alias setting below to ~/.profile or ~/.bashrc:
$ alias node-webduino="sudo docker run -d --privileged \
-v /dev/ttyS1:/dev/ttyACM0 \
-p 3000:3000 coopermaa/node-webduino"
Then run following to start node-webduino:
$ node-webdunio
License
Credits: Developers of node.js, Arduino, SocketStream, AngularJS, firmata and people who involved in improving Web technologies.