General IMU Library
Dependencies: mbed LSM9DS1_Library
IMU.h
- Committer:
- jcallahan1
- Date:
- 2017-02-16
- Revision:
- 2:ae1bfb236387
- Parent:
- 0:0a3c6797d2ed
- Child:
- 3:3b572eec3f20
File content as of revision 2:ae1bfb236387:
/**
* @file IMU.h
*
* @brief Class for reading the accelerometer
*
* @author Terrabots Team
*
*/
#ifndef IMU_H
#define IMU_H
#include "mbed.h"
#include "LSM9DS1.h"
class IMU {
public:
/**
* Constructor for the IMU
*
* @param[in] _state
*/
IMU();
IMU() : _I(p9, p10, 0xD6, 0x3C){};
/**
* Track the angle of the truck bed
*/
void trackBed();
/**
* Track the angle of the truck as it moves
*/
void trackHeading();
private:
bool state;
float ax01;
float ay01;
float az01;
float ax0;
float ay0;
float az0;
float ax;
float ay;
float az;
float theta;
LSM9DS1 _I;
};
#endif