A web FrontEnd for Arduino. Real-time I/O monitoring and controlling in your browser.
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 socket.io@0.9.15 --save
Note the lastest socket.io seems not compatible with socketstream.
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:
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
Credits: Developers of node.js, Arduino, SocketStream, AngularJS, firmata and people who involved in improving Web technologies.