ant-plus-next / HeartRateScanner
Represents a scanner for Heart Rate sensors. Extends the AntPlusScanner class to handle scanning and state updates for multiple Heart Rate sensors.
AntPlusScanner
new HeartRateScanner(
stick
):HeartRateScanner
Constructs an instance of the AntPlusScanner class.
The USB driver instance used for communication with the ANT+ stick.
AntPlusScanner.constructor
detach():
Promise
<void
>
Detaches the sensor from its assigned channel and stops communication.
Promise
<void
>
Will throw an error if there is an issue detaching.
AntPlusScanner.detach
scan():
Promise
<void
>
Initiates a scan for ANT+ sensors by receiving broadcast messages.
Promise
<void
>
A promise that resolves when the scanning process is complete.
// Example usage:
const scanner = new AntPlusScanner();
scanner.scan();
AntPlusScanner.scan