0.0.1 • Published 4 years ago

use-bluetooth-notifications v0.0.1

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

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>