0.0.1 • Published 4 years ago
use-bluetooth-notifications v0.0.1
use-bluetooth-notifications
A react hook to easily use and listen to bluetooth notifications from a specified service and characteristic
Usage
const { device, status, stream, startStream, stopStream } = useBluetoothNotifications({
serviceUuid = "health_thermometer",
characteristicUuid = "temperature_measurement",
notificationHandler = (parsedValue) => { ... },
});
<button onClick={startStream}>Start</button>
<button onClick={stopStream}>Stop</button>
0.0.1
4 years ago