Thanks to visit codestin.com
Credit goes to github.com

Skip to content

0x77dev/frame-sdk

Repository files navigation

frame-sdk

npm

Standard

JavaScript SDK for Brilliant Labs Frame with support for Browser and Node.js

(Work in progress for React Native support)

Examples

Usage

Initialize

import { Frame } from "@0x77/frame-sdk";

const frame = new Frame();

Or using a custom Bluetooth implementation:

import { Frame } from "@0x77/frame-sdk";
import { NobleTransport } from "@0x77/frame-sdk/dist/transport/noble";

const frame = new Frame({
  transport: new NobleTransport(),
});

Connect

await frame.connect();

Disconnect

await frame.disconnect();

Display Text

await frame.display.text({ text: "hello world" });
await frame.display.show();

Receive Data

frame.onData.subscribe((data: string) => {
  console.log(data);
});

Send Lua Code

await frame.sendData("print('Hello, World!')");

About

JavaScript SDK for Brilliant Labs Frame with support for Browser and Node.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published