Mpu6500 Class

Definition

MPU6500 - gyroscope, accelerometer and temperature sensor

public class Mpu6500 : IDisposable
[System.Device.Model.Interface("MPU6500 - gyroscope, accelerometer and temperature sensor")]
public class Mpu6500 : IDisposable
[System.Device.Model.Interface("MPU6500 - gyroscope, accelerometer and temperature sensor")]
public class Mpu6500 : Iot.Device.Imu.Mpu6050
type Mpu6500 = class
    interface IDisposable
[<System.Device.Model.Interface("MPU6500 - gyroscope, accelerometer and temperature sensor")>]
type Mpu6500 = class
    interface IDisposable
[<System.Device.Model.Interface("MPU6500 - gyroscope, accelerometer and temperature sensor")>]
type Mpu6500 = class
    inherit Mpu6050
Public Class Mpu6500
Implements IDisposable
Public Class Mpu6500
Inherits Mpu6050
Inheritance
Mpu6500
Inheritance
Mpu6500
Derived
Attributes
Implements

Constructors

Mpu6500(I2cDevice)

Initialize the MPU6500

Fields

DefaultI2cAddress

Default address for MPU9250

DefaultI2cAddress

Default address for MPU9250

(Inherited from Mpu6050)
SecondI2cAddress

Second address for MPU9250

SecondI2cAddress

Second address for MPU9250

(Inherited from Mpu6050)

Properties

AccelerationScale

Get the real accelerometer bandwidth. This allows to calculate the real degree per second

AccelerationScale

Get the real accelerometer bandwidth. This allows to calculate the real degree per second

(Inherited from Mpu6050)
AccelerometerBandwidth

Get or set the accelerometer bandwidth

AccelerometerBandwidth

Get or set the accelerometer bandwidth

(Inherited from Mpu6050)
AccelerometerBias

Accelerometer bias data

AccelerometerBias

Accelerometer bias data

(Inherited from Mpu6050)
AccelerometerLowPowerFrequency

Set or get the accelerometer low power mode

AccelerometerLowPowerFrequency

Set or get the accelerometer low power mode

(Inherited from Mpu6050)
AccelerometerRange

Get or set the accelerometer range

AccelerometerRange

Get or set the accelerometer range

(Inherited from Mpu6050)
DisableModes

Get or set the elements to disable. It can be any axes of the accelerometer and or the gyroscope

DisableModes

Get or set the elements to disable. It can be any axes of the accelerometer and or the gyroscope

(Inherited from Mpu6050)
FifoCount

Get the number of elements to read from the FIFO (First In First Out) buffer

FifoCount

Get the number of elements to read from the FIFO (First In First Out) buffer

(Inherited from Mpu6050)
FifoModes

Get or set the FIFO (First In First Out) modes

FifoModes

Get or set the FIFO (First In First Out) modes

(Inherited from Mpu6050)
GyroscopeBandwidth

Get or set the gyroscope bandwidth

GyroscopeBandwidth

Get or set the gyroscope bandwidth

(Inherited from Mpu6050)
GyroscopeBias

Gyroscope bias data

GyroscopeBias

Gyroscope bias data

(Inherited from Mpu6050)
GyroscopeRange

Get or set the gyroscope range

GyroscopeRange

Get or set the gyroscope range

(Inherited from Mpu6050)
GyroscopeScale

Get the real gyroscope bandwidth. This allows to calculate the real angular rate in degree per second

GyroscopeScale

Get the real gyroscope bandwidth. This allows to calculate the real angular rate in degree per second

(Inherited from Mpu6050)
SampleRateDivider

Get or set the sample diver mode

SampleRateDivider

Get or set the sample diver mode

(Inherited from Mpu6050)

Methods

CalibrateGyroscopeAccelerometer()

Perform full calibration the gyroscope and the accelerometer It will automatically adjust as well the offset stored in the device The result bias will be stored in the AcceloremeterBias and GyroscopeBias

CalibrateGyroscopeAccelerometer()

Perform full calibration the gyroscope and the accelerometer It will automatically adjust as well the offset stored in the device The result bias will be stored in the AcceloremeterBias and GyroscopeBias

(Inherited from Mpu6050)
Dispose()

Cleanup everything

Dispose()

Cleanup everything

(Inherited from Mpu6050)
GetAccelerometer()

Get the accelerometer in G

GetAccelerometer()

Get the accelerometer in G

(Inherited from Mpu6050)
GetGyroscopeReading()

Get the gyroscope in degrees per seconds

GetGyroscopeReading()

Get the gyroscope in degrees per seconds

(Inherited from Mpu6050)
GetTemperature()

Get the temperature

GetTemperature()

Get the temperature

(Inherited from Mpu6050)
ReadByteFromReplicaDevice(I2cChannel, Byte, Byte, Span<Byte>)

Read data from any of the I2C replica attached to the MPU9250

ReadByteFromReplicaDevice(I2cChannel, Byte, Byte, Span<Byte>)

Read data from any of the I2C replica attached to the MPU9250

(Inherited from Mpu6050)
ReadByteFromSlaveDevice(I2cChannel, Byte, Byte, Span<Byte>)

Read data from any of the I2C slave attached to the MPU9250

ReadFifo(Span<Byte>)

Read data in the FIFO (First In First Out) buffer, read as many data as the size of readData byte span You should read the number of data available in the FifoCount property then read them here. You will read only data you have selected in FifoModes. Data are in the order of the Register from 0x3B to 0x60. ACCEL_XOUT_H and ACCEL_XOUT_L ACCEL_YOUT_H and ACCEL_YOUT_L ACCEL_ZOUT_H and ACCEL_ZOUT_L TEMP_OUT_H and TEMP_OUT_L GYRO_XOUT_H and GYRO_XOUT_L GYRO_YOUT_H and GYRO_YOUT_L GYRO_ZOUT_H and GYRO_ZOUT_L EXT_SENS_DATA_00 to EXT_SENS_DATA_24

ReadFifo(Span<Byte>)

Read data in the FIFO (First In First Out) buffer, read as many data as the size of readData byte span You should read the number of data available in the FifoCount property then read them here. You will read only data you have selected in FifoModes. Data are in the order of the Register from 0x3B to 0x60. ACCEL_XOUT_H and ACCEL_XOUT_L ACCEL_YOUT_H and ACCEL_YOUT_L ACCEL_ZOUT_H and ACCEL_ZOUT_L TEMP_OUT_H and TEMP_OUT_L GYRO_XOUT_H and GYRO_XOUT_L GYRO_YOUT_H and GYRO_YOUT_L GYRO_ZOUT_H and GYRO_ZOUT_L EXT_SENS_DATA_00 to EXT_SENS_DATA_24

(Inherited from Mpu6050)
RunGyroscopeAccelerometerSelfTest()

Run a self test and returns the gyroscope and accelerometer vectores a. If factory Self-Test values ST_OTP≠0, compare the current Self-Test response (GXST, GYST, GZST, AXST, AYST and AZST) to the factory Self-Test values (ST_OTP) and report Self-Test is passing if all the following criteria are fulfilled: Axis | Pass criteria X-gyro | (GXST / GXST_OTP) > 0.5 Y-gyro | (GYST / GYST_OTP) > 0.5 Z-gyro | (GZST / GZST_OTP) > 0.5 X-Accel | 0.5 < (AXST / AXST_OTP) < 1.5 Y-Accel | 0.5 < (AYST / AYST_OTP) < 1.5 Z-Accel | 0.5 < (AZST / AZST_OTP) < 1.5 b. If factory Self-Test values ST_OTP=0, compare the current Self-Test response (GXST, GYST, GZST, AXST, AYST and AZST) to the ST absolute limits (ST_AL) and report Self-Test is passing if all the following criteria are fulfilled. Axis | Pass criteria X-gyro | |GXST| ≥ 60dps Y-gyro | |GYST| ≥ 60dps Z-gyro | |GZST| ≥ 60dps X-Accel| 225mgee ≤ |AXST| ≤ 675mgee Y-Accel| 225mgee ≤ |AXST| ≤ 675mgee Z-Accel| 225mgee ≤ |AXST| ≤ 675mgee c. If the Self-Test passes criteria (a) and (b), it’s necessary to check gyro offset values. Report passing Self-Test if the following criteria fulfilled. Axis | Pass criteria X-gyro | |GXOFFSET| ≤ 20dps Y-gyro | |GYOFFSET| ≤ 20dps Z-gyro | |GZOFFSET| ≤ 20dps

SetWakeOnMotion(UInt32, AccelerometerLowPowerFrequency)

Setup the Wake On Motion. This mode generate a rising signal on pin INT You can catch it with a normal GPIO and place an interruption on it if supported Reading the sensor won't give any value until it wakes up periodically Only Accelerator data is available in this mode

SetWakeOnMotion(UInt32, AccelerometerLowPowerFrequency)

Setup the Wake On Motion. This mode generate a rising signal on pin INT You can catch it with a normal GPIO and place an interruption on it if supported Reading the sensor won't give any value until it wakes up periodically Only Accelerator data is available in this mode

(Inherited from Mpu6050)
WriteByteToReplicaDevice(I2cChannel, Byte, Byte, Byte)

Write data on any of the I2C replica attached to the MPU9250

WriteByteToReplicaDevice(I2cChannel, Byte, Byte, Byte)

Write data on any of the I2C replica attached to the MPU9250

(Inherited from Mpu6050)
WriteByteToSlaveDevice(I2cChannel, Byte, Byte, Byte)

Write data on any of the I2C slave attached to the MPU9250

Applies to