17#include "I2Cdev/I2Cdev.h"
19#include "MPU6050/MPU6050_6Axis_MotionApps612.h"
80 uint8_t fifoBuffer [64];
110 static const uint8_t DEFAULT_I2C_ADDRESS;
115 static const uint32_t I2C_FREQ;
171 bool begin (
const uint8_t init_i2c_address = DEFAULT_I2C_ADDRESS);
246 double get_yaw (
const bool ask_for_update =
true);
262 double get_roll (
const bool ask_for_update =
true);
Heading_sensor()
Creates a Heading_sensor object.
Definition Heading_sensor.h:28
void save_caled_vals()
Saves the calibrated values into our local EEPROM in this XRCU.
void reset()
Resets the MPU (including yaw pitch roll orientations).
Mpu_6050_dmp(const uint32_t init_port)
Creates a new MPU-6050 object.
uint16_t get_heading()
Gets the heading in degrees.
Mpu_6050_cal_vals_t cal(const uint8_t sampling_amount=20)
Calibrates this MPU sensor.
double get_pitch(const bool ask_for_update=true)
Gets the pitch of gyroscope in degrees [ -90.00 : +90.00 ].
double get_yaw(const bool ask_for_update=true)
Gets the heading of gyroscope in degrees [ 0.00 : 359.99 ].
void end()
Releases the resources used by this object.
bool begin(const uint8_t init_i2c_address=DEFAULT_I2C_ADDRESS)
Configures the settings of the I2C bus and this MPU sensor.
Mpu_6050_cal_vals_t get_prev_caled_vals()
Gets the previously calibrated values of the MPU sensor.
bool reset_heading()
Takes the current heading of sensor as zero.
~Mpu_6050_dmp()
Destroys this MPU-6050 object.
bool begin(const Mpu_6050_cal_vals_t mpu_cal_values, const uint8_t init_i2c_address=DEFAULT_I2C_ADDRESS)
Configures the settings of the I2C bus and this MPU sensor.
double get_roll(const bool ask_for_update=true)
Gets the roll of gyroscope in degrees [ -180.00 : +180.00 ].
uint8_t who_am_i()
Gets the WHO_AM_I value of this MPU sensor.
bool is_gyro_present()
Checks for the presence of of MPU sensor.
MPU-6050 calibration values packet.
Definition Mpu_6050_dmp.h:28
int16_t y_accel_offset
Calibration offset in y-axis accelerometer.
Definition Mpu_6050_dmp.h:37
int16_t y_gyro_offset
Calibration offset in y-axis gyroscope.
Definition Mpu_6050_dmp.h:52
int16_t z_accel_offset
Calibration offset in z-axis accelerometer.
Definition Mpu_6050_dmp.h:42
int16_t z_gyro_offset
Calibration offset in z-axis gyroscope.
Definition Mpu_6050_dmp.h:57
int16_t x_gyro_offset
Calibration offset in x-axis gyroscope.
Definition Mpu_6050_dmp.h:47
int16_t x_accel_offset
Calibration offset in x-axis accelerometer.
Definition Mpu_6050_dmp.h:32