# ts-webusb-serial

> TS Fork of webusb-serial

Latest version **2.1.8** (published 2020-09-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install ts-webusb-serial
pnpm add ts-webusb-serial
yarn add ts-webusb-serial
bun add ts-webusb-serial
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.8 |
| Published | 2020-09-26 |
| First published | 2020-09-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 9.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Eivind Hyldmo |
| Maintainers | hyldmo |

## Links

- npm: https://www.npmjs.com/package/ts-webusb-serial
- Repository: https://github.com/hyldmo/webusb-serial
- Homepage: https://github.com/hyldmo/webusb-serial#readme
- Issues: https://github.com/hyldmo/webusb-serial/issues
- npm.io page: https://npm.io/package/ts-webusb-serial

## Recent versions

- 2.1.8 (latest) — 2020-09-26
- 2.1.7 — 2020-09-26
- 2.1.6 — 2020-09-26
- 2.1.5 — 2020-09-26
- 2.1.4 — 2020-09-26
- 2.1.3 — 2020-09-26
- 2.1.2 — 2020-09-26
- 2.1.1 — 2020-09-26

## README

webusb-serial
=============

A virtual [node-serialport](https://github.com/voodootikigod/node-serialport) implementation that uses [webusb](https://wicg.github.io/webusb/) as the transport.


# webusbSerialPort

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

```js
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);
});

```

---
_Source: https://npm.io/package/ts-webusb-serial · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
