Skip to content

Repository files navigation

Note client for DeviceScript

This project uses DeviceScript to interact with a blues.io Notecard.

This library uses the serial-to-i2c bridge.

This library has a minimal surface and most messages have not been mapped to types. See Notecard API for a full list.

Setup

Add the library to your DeviceScript project:

npm install --save pelikhan/devicescript-note

Configuration

Add the notehub product UID into your settings. By default, DeviceScript will use the deviceid as a serial number; but you can override this setting.

# .env.defaultsNOTE_PUID=your-product-uidNOTE_SN=your-serial-number

Usage

  • Connect the notecard to your I2C pins and power it up.
import{delay,millis}from"@devicescript/core"import{init,request,NoteAddRequest}from"devicescript-note"// configure product UID and serial numberawaitinit()while(true){// send node.add requestconstres=awaitrequest(<NoteAddRequest>{req: "note.add",body: {time: millis()},})console.log(res)// take a breakawaitdelay(10000)}

Contributing

Contributions are welcome. Follow the guide.

About

A DeviceScript library to use blues.io notecard

Topics

Resources

Contributing

Stars

1 star

Watchers

1 watching

Forks

Releases

Contributors

Languages