0.4.1 • Published 7 years ago

dreamscreen v0.4.1

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

DreamScreen BLE Interface

Provides a convenient high level abstraction to the BLE interface of the DreamScreen

Uses the command set from the DIY Board

Uses noble as the interface layer

Install

It's on npm

npm install --save dreamscreen

Usage

const DreamScreen = require('dreamscreen');

DreamScreen.getInstance()
.then(ds =>
    ds.setMode('video')
    .then(() => ds.setBrightness(50))
)

Options

Current options that can be passed to getInstance():

optiondefaultdescription
discoverByNamefalseThe default operation is to try to directly connect to the device by its ID If this is set to true, it will instead discover all devices and stops when one of them matches options.localName
localNameDreamScreenThe default name of the device. Only relevant in conjunction with discoverByName = true
debugfalsePrints out relevant information

Events

The resulting instance extends the node EventEmitter class and follows the following events:

nameargumentsdescription
disconnectThe peripheral has disconnected
read{data, isNotification}A read has occurred. These generally happen after sendRead operations
sendcodeAny code gets written to the peripheral

Caveats

Noble does not play nice with multiple instances so this package hijacks it.

Things are probably not going to go well if this is used together with other noble packages.

Tested on OSX and on Raspberry PI 3

0.4.1

7 years ago

0.4.0

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago