Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
node.js lib for the Sensordrone
JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
LICENSE
README.md
index.js
package.json
test.js

README.md

node-sensordrone

Analytics

node.js lib for the Sensorcon Sensordrone

Special thanks to @mrose17 for sending me a Sensordrone!

Notes

Install

npm install sensordrone

Usage

var Sensordrone = require('sensordrone');

Discover

Sensordrone.discover(callback(sensordrone));

Connect

sensordrone.connect(callback);

Disconnect

sensordrone.disconnect(callback);

Discover Services and Characteristics

sensordrone.discoverServicesAndCharacteristics(callback);

Battery Voltage

sensorTag.readBatteryVoltage(callback(voltage));

LED's

// values 0 - 255
sensordrone.setLeds(leftRed, leftGreen, leftBlue, rightRed, rightGreen, rightBlue, callback);

Ambient Temperature

sensorTag.readAmbientTemperature(callback(temperature));

Humidity

sensorTag.readHumidity(callback(humidity));

Pressure

Enable/disable:

sensordrone.enablePressure(callback);

sensordrone.disablePressure(callback);

Read:

sensordrone.readPressure(callback(pressure));

Altitude (based on pressure)

Enable/disable:

sensordrone.enableAltitude(callback);

sensordrone.disableAltitude(callback);

Read:

sensordrone.readAltitude(callback(altitude));

RGBC

Enable/disable:

sensordrone.enableRGBC(callback);

sensordrone.disableRGBC(callback);

Read:

sensordrone.readRGBC(callback(r, g, b, c, lux, temp)); // temp in Kelvins

IR Temperature

Enable/disable:

sensordrone.enableIrTemperature(callback);

sensordrone.disableIrTemperature(callback);

Read:

sensordrone.readIrTemperature(callback(temperature));

Precision Gas

sensordrone.readPrecisionGas(callback(ppmCO));

Oxidizing Gas

Enable/disable:

sensordrone.enableOxidizingGas(callback);

sensordrone.disableOxidizingGas(callback);

Read:

sensordrone.readOxidizingGas(callback(ohms));

Reducing Gas

Enable/disable:

sensordrone.enableReducingGas(callback);

sensordrone.disableReducingGas(callback);

Read:

sensordrone.readReducingGas(callback(ohms));

ADC

sensordrone.readADC(callback(voltage));

Capacitance

Enable/disable:

sensordrone.enableCapacitance(callback);

sensordrone.disableCapacitance(callback);

Read:

sensordrone.readCapacitance(callback(capacitance));

UART

Write:

sensordrone.writeUart(data, callback);

Read:

sensordrone.readUart(callback(data));

External CO2 sensor

Setup:

sensordrone.setupExternalCO2(callback);

Read:

sensordrone.readExternalCO2(callback(ppm));
Something went wrong with that request. Please try again.