The Webduino Javascript Core, for Browser and Node.js
Using bower:
$ bower install webduino-js#dist
Insert scripts:
<script src="bower_components/webduino-js/dist/webduino-base.js"></script>
<script src="bower_components/webduino-js/src/module/Led.js"></script>
... (modules used)
Or all-in-one:
<script src="bower_components/webduino-js/dist/webduino-all.js"></script>
$ npm install webduino-js
webduino-js provides isomorphic APIs:
var webduino = require('webduino-js');
var board, led;
board = new webduino.WebArduino('device_id');
board.on('ready', function() {
led = new webduino.module.Led(board, board.getDigitalPin(10));
led.on();
});
webduino-js talks to Webduino Dev Board via MQTT by default. However, since webduino-js speaks Firmata, we can also directly talk to standard Arduino or any dev board that understands firmata.
Currently we have transports supporting USB serial port and Bluetooth (HC-06 tested) communications: (Note: you have to install Firmata library first)
This project is licensed under MIT license, see LICENSE for more information.