MetaWear C# SDK  1.2.0
C# API for MbientLab's sensor platform
Public Member Functions | Properties | List of all members
MbientLab.MetaWear.Sensor.IAccelerometer Interface Reference

Measures sources of acceleration, such as gravity or motion. This interface only provides general access to an accelerometer. If you know specifically which accelerometer is on your board, use the appropriate subclass instead.

See also
IAccelerometerBma255, IAccelerometerBmi160, IAccelerometerMma8452q
More...

Inheritance diagram for MbientLab.MetaWear.Sensor.IAccelerometer:
MbientLab.MetaWear.IModule MbientLab.MetaWear.Sensor.IAccelerometerBosch MbientLab.MetaWear.Sensor.IAccelerometerMma8452q MbientLab.MetaWear.Sensor.IAccelerometerBma255 MbientLab.MetaWear.Sensor.IAccelerometerBmi160

Public Member Functions

void Configure (float odr=100f, float range=2f)
 General function to configure the accelerometer. The closest valid values will be selected based on the underlying accelerometer which may not equal the input values. More...
 
void Start ()
 Switch the accelerometer into active mode More...
 
void Stop ()
 Switch the accelerometer into standby mode More...
 
Task PullConfigAsync ()
 Pulls the current accelerometer output data rate and data range from the sensor More...
 

Properties

float Odr [get]
 Currently set output data rate More...
 
float Range [get]
 Currently set data range More...
 
IAsyncDataProducer Acceleration [get]
 Data producer representing the sensor's acceleration data More...
 
IAsyncDataProducer PackedAcceleration [get]
 Variant data producer that packs 3 acceleration samples in to 1 ble packet.
Only streaming is supported by this data producer More...
 

Detailed Description

Measures sources of acceleration, such as gravity or motion. This interface only provides general access to an accelerometer. If you know specifically which accelerometer is on your board, use the appropriate subclass instead.

See also
IAccelerometerBma255, IAccelerometerBmi160, IAccelerometerMma8452q

Member Function Documentation

◆ Configure()

void MbientLab.MetaWear.Sensor.IAccelerometer.Configure ( float  odr = 100f,
float  range = 2f 
)

General function to configure the accelerometer. The closest valid values will be selected based on the underlying accelerometer which may not equal the input values.

Parameters
odrOutput data rate, defaults to 100Hz
rangeAcceleration data range, defaults to 2g

◆ PullConfigAsync()

Task MbientLab.MetaWear.Sensor.IAccelerometer.PullConfigAsync ( )

Pulls the current accelerometer output data rate and data range from the sensor

Returns
Task that is completed when the settings are received

◆ Start()

void MbientLab.MetaWear.Sensor.IAccelerometer.Start ( )

Switch the accelerometer into active mode

◆ Stop()

void MbientLab.MetaWear.Sensor.IAccelerometer.Stop ( )

Switch the accelerometer into standby mode

Property Documentation

◆ Acceleration

IAsyncDataProducer MbientLab.MetaWear.Sensor.IAccelerometer.Acceleration
get

Data producer representing the sensor's acceleration data

◆ Odr

float MbientLab.MetaWear.Sensor.IAccelerometer.Odr
get

Currently set output data rate

This value is only valid if either Configure(float, float) or PullConfigAsync has been called

◆ PackedAcceleration

IAsyncDataProducer MbientLab.MetaWear.Sensor.IAccelerometer.PackedAcceleration
get

Variant data producer that packs 3 acceleration samples in to 1 ble packet.
Only streaming is supported by this data producer

◆ Range

float MbientLab.MetaWear.Sensor.IAccelerometer.Range
get

Currently set data range

This value is only valid if either Configure(float, float) or PullConfigAsync


The documentation for this interface was generated from the following file: