0.0.0 • Published 9 months ago
@0x77/frame-sdk v0.0.0
frame-sdk
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!')");
0.0.0
9 months ago