nonin-3230-ble
v1.1.0
Published
Nonin 3230 BLE library for Node.js
Downloads
3
Maintainers
Readme
nonin-3230-ble
A Node.js lib to abstract the Nonin 3230 BLE pulse oxymeter, using noble-device
Install
npm install nonin-3230-ble --save
Example usage
const Nonin3230 = require('nonin-3230-ble');
Nonin3230.discover((pulseOximeter) => {
pulseOximeter.connectAndSetup((error) => {
if (error) {
console.error(error);
}
let counter = 0;
// receive a new measurement every second
pulseOximeter.on('data', (data) => {
counter++;
console.log(data);
// { counter: int, pulseRate: int, oxygenSaturation: int, status: object }
if (counter > 15) {
pulseOximeter.stopMeasurement(() => console.log('stopped'));
}
});
});
});
For more examples, see noble-device.
Contributions are welcome.