2.0.1 • Published 5 years ago

webusb-serial v2.0.1

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

webusb-serial

A virtual node-serialport implementation that uses webusb as the transport.

webusbSerialPort

Use webusb to send/receive data to a USB connected physical device:

var WebusbSerialPort = require('webusb-serial');
var firmata = require('firmata');


//create the webusb serialport and optionally specify a USB filter
var serialPort = new WebusbSerialPort({
  filters: [
    { 'vendorId': 0x2341, 'productId': 0x8036 }, // Arduino Leonardo
    { 'vendorId': 0x2341, 'productId': 0x8037 }, // Arduino Micro
    { 'vendorId': 0x239a, 'productId': 0x8011 } // Adafruit Circuit Playground
  ]
});

//use the virtual serial port to send a command to a firmata device
var board = new firmata.Board(serialPort, function (err, ok) {
  if (err){ throw err; }
  //light up a pin
  board.digitalWrite(13, 1);
});
2.0.1

5 years ago

2.0.0

5 years ago

0.3.1

8 years ago

0.3.0

8 years ago

0.2.0

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago