2024-09-11 12:19:10 +00:00
|
|
|
|
|
|
|
#ifndef IMU_h
|
|
|
|
#define IMU_h
|
|
|
|
|
|
|
|
#include <MPU6050_tockn.h>
|
|
|
|
|
|
|
|
#define UPDATE_IMU_INTERVAL 1000/50
|
|
|
|
|
|
|
|
#define IMU_AC 0.1f //default 0.02f
|
2024-09-11 15:15:34 +00:00
|
|
|
#define IMU_GC 0.90f //default 0.98f. //AC + GC must equal 1.0
|
2024-09-11 12:19:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void initIMU();
|
|
|
|
void initIMU(float x,float y,float z);
|
|
|
|
void loopIMU(unsigned long millis);
|
|
|
|
bool isBellyUp();
|
|
|
|
|
|
|
|
float getAngleX();
|
|
|
|
float getAngleY();
|
|
|
|
float getAngleZ();
|
|
|
|
|
|
|
|
float getAccX();
|
|
|
|
float getAccY();
|
|
|
|
float getAccZ();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|