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;
141 uint16_t re_zero_yaw;
171 bool begin (
const uint8_t init_i2c_address = DEFAULT_I2C_ADDRESS);
246 double get_yaw (
const bool ask_for_update =
true);
254 double get_pitch (
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.
Definition Mpu_6050_dmp.cpp:200
void reset()
Resets the MPU (including yaw pitch roll orientations).
Definition Mpu_6050_dmp.cpp:229
Mpu_6050_dmp(const uint32_t init_port)
Creates a new MPU-6050 object.
Definition Mpu_6050_dmp.cpp:19
uint16_t get_heading()
Gets the heading in degrees.
Definition Mpu_6050_dmp.cpp:283
Mpu_6050_cal_vals_t cal(const uint8_t sampling_amount=20)
Calibrates this MPU sensor.
Definition Mpu_6050_dmp.cpp:190
double get_pitch(const bool ask_for_update=true)
Gets the pitch of gyroscope in degrees [ -90.00 : +90.00 ].
Definition Mpu_6050_dmp.cpp:269
double get_yaw(const bool ask_for_update=true)
Gets the heading of gyroscope in degrees [ 0.00 : 359.99 ].
Definition Mpu_6050_dmp.cpp:254
void end()
Releases the resources used by this object.
Definition Mpu_6050_dmp.cpp:136
bool begin(const uint8_t init_i2c_address=DEFAULT_I2C_ADDRESS)
Configures the settings of the I2C bus and this MPU sensor.
Definition Mpu_6050_dmp.cpp:60
Mpu_6050_cal_vals_t get_prev_caled_vals()
Gets the previously calibrated values of the MPU sensor.
Definition Mpu_6050_dmp.cpp:178
bool reset_heading()
Takes the current heading of sensor as zero.
Definition Mpu_6050_dmp.cpp:248
~Mpu_6050_dmp()
Destroys this MPU-6050 object.
Definition Mpu_6050_dmp.cpp:32
double get_roll(const bool ask_for_update=true)
Gets the roll of gyroscope in degrees [ -180.00 : +180.00 ].
Definition Mpu_6050_dmp.cpp:276
uint8_t who_am_i()
Gets the WHO_AM_I value of this MPU sensor.
Definition Mpu_6050_dmp.cpp:155
bool is_gyro_present()
Checks for the presence of of MPU sensor.
Definition Mpu_6050_dmp.cpp:165
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