0.0.5 • Published 6 years ago

webduino-serial-transport v0.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

webduino-serial-transport

SerialPort Transport Plugin for webduino-js

Requirement

When running in browser, you must have the following installed:

  1. API Proxy for Google Chrome™ (launch before opening your application)
  2. API Proxy Agent for Google Chrome™

to interface with Webduino/Arduino via SerialPort.

Installation

Browser

See also: webduino-js

The webduino-base.js or webduino-all.js has bundled serial and bluetooth transports by default. If you have successfully built it or use the CDN version, you are ready to go.

Node.js

$ npm install webduino-serial-transport

Usage

webduino-js provides isomorphic APIs:

// Need to acquire 'webduino' in Node.js:
// var webduino = require('webduino-js');

var board, led;

board = new webduino.Arduino({
  transport: 'serial',
  path: '/dev/cu.usbmodem1421'
});

// or:
// board = new webduino.Arduino({
//   transport: require('webduino-serial-transport'),
//   path: '/dev/cu.usbmodem1421'
// });

board.on('ready', function() {
  led = new webduino.module.Led(board, board.getDigitalPin(10));
  led.on();
});

License

This project is licensed under the MIT license, see License for more information.

0.0.5

6 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

9 years ago