Skip to content

jpilet/calypso_ultrasonic

Repository files navigation

Calypso Ultrasonic node interface

This is an example of how to read the Calypso Ultrasonic wind sensor from nodejs.

Quick test:

npm install
node connect

Examples

API

scan(cb)

Start searching for a calypso ultrasonic peripheral. The optional callback is only called if there is an error. See setDiscoveredCallback.

stopScanning(cb)

Stop searching for new devices.

setDiscoveredCallback(callback)

Whenever a Calypso wind sensor is found, the callback gets called. Searches only starts once scan() has been called. The callback takes the form: function(err, peripheral){}

See Noble's peripheral documentation. The peripheral object will have two calypso-specific methods, listenData() and calibrate().

peripheral.listenData(cb)

Subscribe to wind sensor data stream. The callback is: function(err, sensorData) Sensor data has the following fields:

Field Units
aws knots
awa degrees
battery percent
temperature Celsius degrees
roll degrees
pitch degrees
heading degrees

peripheral.calibrate(cb)

Run the calibration procedure. See the calibration example The callback has the following signature: cb(err). If err is undefined or null, calibration succeeded and was saved.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published