Created
February 17, 2022 16:00
-
-
Save Taym95/2470b2a25fa4b597687a492c0a27c590 to your computer and use it in GitHub Desktop.
Web Zigbee
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const device = await navigator.bluetooth.requestDevice({ | |
filters: [{ services: ["services"] }], | |
optionalServices: ["services"], | |
}); | |
const server = await device.gatt.connect(); | |
const service = await server.getPrimaryService("services"); | |
const characteristic = await service.getCharacteristic("characteristic"); | |
await characteristic.writeValue(payload); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment