mirror of
https://github.com/moritzruth/node-enttec-open-dmx-usb.git
synced 2025-04-21 07:41:22 +02:00
Add README.md
This commit is contained in:
parent
32cdc3ae2d
commit
f42a2c52f3
2 changed files with 33 additions and 1 deletions
32
README.md
Normal file
32
README.md
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
# node-enttec-open-dmx-usb
|
||||||
|
> A Node.js library for sending DMX data through the
|
||||||
|
>[Enttec Open DMX USB Interface](https://www.enttec.co.uk/en/product/controls/dmx-usb-interfaces/open-dmx-usb/)
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
```bash
|
||||||
|
yarn add node-enttec-open-dmx-usb
|
||||||
|
# or
|
||||||
|
npm install node-enttec-open-dmx-usb
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
All functions are documented using JSDoc and the code is not uglified, so feel free to [explore it](index.js).
|
||||||
|
|
||||||
|
```js
|
||||||
|
import { EnttecOpenDMXUSBDevice as DMXDevice } from "node-enttec-open-dmx-usb";
|
||||||
|
|
||||||
|
(async () => {
|
||||||
|
const device = new DMXDevice(await DMXDevice.getFirstAvailableDevice());
|
||||||
|
|
||||||
|
device.setChannels({
|
||||||
|
1: 0xFF,
|
||||||
|
2: 0x44
|
||||||
|
});
|
||||||
|
|
||||||
|
// same as
|
||||||
|
device.setChannels([0xFF, 0x44]);
|
||||||
|
|
||||||
|
// same as
|
||||||
|
device.setChannels(Buffer.from([0xFF, 0x44]));
|
||||||
|
})();
|
||||||
|
```
|
|
@ -11,7 +11,7 @@
|
||||||
"build": "babel src --out-dir lib"
|
"build": "babel src --out-dir lib"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"lib/*"
|
"index.js"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/preset-env": "^7.7.7",
|
"@babel/preset-env": "^7.7.7",
|
||||||
|
|
Loading…
Add table
Reference in a new issue