Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/webduinoio/webduino-serial-transport

πŸ”Œ Serialport Transport Plugin for webduino-js
https://github.com/webduinoio/webduino-serial-transport

serial-ports webduino webduino-js

Last synced: 6 days ago
JSON representation

πŸ”Œ Serialport Transport Plugin for webduino-js

Awesome Lists containing this project

README

        

# 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β„’](https://chrome.google.com/webstore/detail/api-proxy-for-google-chro/pddlkidaibpbhpkfbhkbeolbagpmkhhn) (launch before opening your application)
2. [API Proxy Agent for Google Chromeβ„’](https://chrome.google.com/webstore/detail/api-proxy-agent-for-googl/kdhdgaemffmpfmceolgbfpnfiafbjdkp)

to interface with Webduino/Arduino via SerialPort.

## Installation
### Browser
_See also:_
[webduino-js](https://github.com/webduinoio/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
```sh
$ npm install webduino-serial-transport
```

## Usage
**webduino-js** provides isomorphic APIs:

```javascript
// 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](LICENSE) for more information.