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: 2 months ago
JSON representation
🔌 Serialport Transport Plugin for webduino-js
- Host: GitHub
- URL: https://github.com/webduinoio/webduino-serial-transport
- Owner: webduinoio
- License: mit
- Created: 2015-11-10T08:42:47.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-11-12T09:18:44.000Z (over 6 years ago)
- Last Synced: 2025-02-04T08:04:04.613Z (3 months ago)
- Topics: serial-ports, webduino, webduino-js
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 10
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.