MBot Software Library  v1.0
An API documentation to mbot_firmware repository
List of all members
rc_mpu_config_t Struct Reference

configuration of the mpu sensor More...

#include <mpu.h>

Public Attributes

physical connection configuration
int gpio_interrupt_pin
 gpio pin, default 21 on Robotics Cape and BB Blue
 
i2c_inst_t * i2c_bus
 i2c instance
 
uint8_t i2c_addr
 default is 0x68, pull pin ad0 high to make it 0x69
 
int show_warnings
 set to 1 to print i2c_bus warnings for debug
 
accelerometer, gyroscope, and magnetometer configuration
rc_mpu_accel_fsr_t accel_fsr
 accelerometer full scale range, default ACCEL_FSR_8G
 
rc_mpu_gyro_fsr_t gyro_fsr
 gyroscope full scale range, default GYRO_FSR_2000DPS
 
rc_mpu_accel_dlpf_t accel_dlpf
 internal low pass filter cutoff, default ACCEL_DLPF_184
 
rc_mpu_gyro_dlpf_t gyro_dlpf
 internal low pass filter cutoff, default GYRO_DLPF_184
 
int enable_magnetometer
 magnetometer use is optional, set to 1 to enable, default 0 (off)
 
DMP settings, only used with DMP mode
int dmp_sample_rate
 sample rate in hertz, 200,100,50,40,25,20,10,8,5,4
 
int dmp_fetch_accel_gyro
 set to 1 to optionally raw accel/gyro when reading DMP quaternion, default: 0 (off)
 
int dmp_auto_calibrate_gyro
 set to 1 to let DMP auto calibrate the gyro while in use, default: 0 (off)
 
rc_mpu_orientation_t orient
 DMP orientation matrix, see rc_mpu_orientation_t.
 
double compass_time_constant
 time constant (seconds) for filtering compass with gyroscope yaw value, default 25
 
int read_mag_after_callback
 reads magnetometer after DMP callback function to improve latency, default 1 (true)
 
int mag_sample_rate_div
 magnetometer_sample_rate = dmp_sample_rate/mag_sample_rate_div, default: 4
 
int tap_threshold
 threshold impulse for triggering a tap in units of mg/ms
 

Detailed Description

configuration of the mpu sensor

Configuration struct passed to rc_mpu_initialize and rc_mpu_initialize_dmp. It is best to get the default config with rc_mpu_default_config() function first and modify from there.


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