Skip to content

Instantly share code, notes, and snippets.

@kkmonster
Created February 26, 2015 07:09
Show Gist options
  • Save kkmonster/a06bbab4c8d2f4a19fd8 to your computer and use it in GitHub Desktop.
Save kkmonster/a06bbab4c8d2f4a19fd8 to your computer and use it in GitHub Desktop.
#define beta 0.1f
#define ACCELEROMETER_SENSITIVITY 16384.0f
#define GYROSCOPE_SENSITIVITY 131.07f
#define M_PI 3.14159265359f
#define sampleFreq 250.0f // 250 hz sample rate!
void Initial_MPU6050(void);
void read_mpu6050(void);
void MPU6050_WriteBits(uint8_t slaveAddr, uint8_t regAddr, uint8_t bitStart, uint8_t length, uint8_t data);
void MPU6050_WriteBit(uint8_t slaveAddr, uint8_t regAddr, uint8_t bitNum, uint8_t data);
void MPU6050_ReadBits(uint8_t slaveAddr, uint8_t regAddr, uint8_t bitStart, uint8_t length, uint8_t *data);
void MPU6050_ReadBit(uint8_t slaveAddr, uint8_t regAddr, uint8_t bitNum, uint8_t *data);
void MPU6050_GetRawAccelGyro(int16_t* AccelGyro);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment