This project is read-only.

Developer Guide (User Guide)

Finding devices

var provider = new SensorDroneProvider();
var devices   = await provider.ScanAsync();

Connect to a device

bool connected = device.ConnectAsync();
string version = device.Version;
string name    = device.Name;

Determine what sensors are connected

var sensors = device.Sensors;
foreach(var sensor in sensors)
{
 System.Console.WriteLine(sensor.Name);
}

Enabling sensors

var enabled = await device.EnableAllAsync();


or

bool enabled = device.Enable("Ambient"); 

Sampling Sensors

To sample a sensor value

var reading = device.Sample("Voltage");


or

var reading = await device.SampleAsync("Voltage");


The Reading class provides the following properties
  • Name The name of the sensor
  • Value The sampled valued
  • Unit The unit of measure

The Measure property provides a SI unit of measure, if applicable
The AlternateUnits property lists alternative units of measure e.g. Celsius, Kelvin or Fahrenheit for temperature.
var value = reading.Measure.GetValue(reading.AlternateUnits[0]);

Using Rx

Last edited Jan 5, 2014 at 6:12 PM by msrushton, version 7