Characteristic Locus
Inheritance System.Object > Mpu6050
Implements IAccelerometer System.IDisposable
Namespace Meadow.Foundation.Sensors.Motion
Assembly Mpu6050.dll

Syntax

public class Mpu6050 : FilterableObservableBase<AccelerationConditionChangeResult, AccelerationConditions>, IAccelerometer, IDisposable

Constructors

Mpu6050(II2cBus, Mpu6050.Addresses)

Declaration
public Mpu6050(II2cBus bus, Mpu6050.Addresses address)

Parameters

Type Name Description
II2cBus bus
Mpu6050.Addresses address

Mpu6050(II2cBus, Byte)

Declaration
public Mpu6050(II2cBus bus, byte address = 104)

Parameters

Type Name Description
II2cBus bus
System.Byte address

Properties

AccelerationChangeThreshold

Declaration
public float AccelerationChangeThreshold { get; set; }

Property Value

Type Description
System.Single

AccelerationX

Acceleration along the X-axis.

Declaration
public float AccelerationX { get; }

Property Value

Type Description
System.Single

Remarks

This property will only contain valid data after a call to Read or after an interrupt has been generated.

AccelerationY

Acceleration along the Y-axis.

Declaration
public float AccelerationY { get; }

Property Value

Type Description
System.Single

Remarks

This property will only contain valid data after a call to Read or after an interrupt has been generated.

AccelerationZ

Acceleration along the Z-axis.

Declaration
public float AccelerationZ { get; }

Property Value

Type Description
System.Single

Remarks

This property will only contain valid data after a call to Read or after an interrupt has been generated.

Address

Declaration
public byte Address { get; }

Property Value

Type Description
System.Byte

Conditions

Declaration
public AccelerationConditions Conditions { get; protected set; }

Property Value

Type Description
AccelerationConditions

GyroChangeThreshold

Declaration
public float GyroChangeThreshold { get; set; }

Property Value

Type Description
System.Single

IsSampling

Gets a value indicating whether the analog input port is currently sampling the ADC. Call StartSampling() to spin up the sampling process.

Declaration
public bool IsSampling { get; protected set; }

Property Value

Type Description
System.Boolean

true if sampling; otherwise, false.

TemperatureC

Temperature of sensor

Declaration
public float TemperatureC { get; }

Property Value

Type Description
System.Single

XGyroscopicAcceleration

Gyroscope X measurement, in degrees per second

Declaration
public float XGyroscopicAcceleration { get; }

Property Value

Type Description
System.Single

YGyroscopicAcceleration

Gyroscope Y measurement, in degrees per second

Declaration
public float YGyroscopicAcceleration { get; }

Property Value

Type Description
System.Single

ZGyroscopicAcceleration

Gyroscope Z measurement, in degrees per second

Declaration
public float ZGyroscopicAcceleration { get; }

Property Value

Type Description
System.Single

Methods

Dispose()

Dispose managed resources

Declaration
public void Dispose()

Dispose(Boolean)

Declaration
protected virtual void Dispose(bool disposing)

Parameters

Type Name Description
System.Boolean disposing

RaiseChangedAndNotify(AccelerationConditionChangeResult)

Declaration
protected void RaiseChangedAndNotify(AccelerationConditionChangeResult changeResult)

Parameters

Type Name Description
AccelerationConditionChangeResult changeResult

StartUpdating(Int32)

Declaration
public void StartUpdating(int standbyDuration = 1000)

Parameters

Type Name Description
System.Int32 standbyDuration

StopUpdating()

Declaration
public void StopUpdating()

Wake()

Declaration
public void Wake()

Events

Updated

Declaration
public event EventHandler<AccelerationConditionChangeResult> Updated

Event Type

Type Description
System.EventHandler<AccelerationConditionChangeResult>