![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
near space 2019
Dependencies: mbed SDFileSystem ExtendedTimer
Diff: BNO055.h
- Revision:
- 0:0d79a3b05b2c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BNO055.h Thu Mar 21 17:51:23 2019 +0000 @@ -0,0 +1,30 @@ +/* Embedded Systems Final Project: 9-Axis Absolute Orientation imu (BNO055) ndof.h +*/ + +#ifndef BNO055_H +#define BNO055_H + +#include "mbed.h" + +#define BNO055_MODE_NDOF 0 //used to call the 9 axis orientation of imu + +#define BNO055_ANGLE_UNITS_DEGREE 0 +#define BNO055_ANGLE_UNITS_RADIAN 1 + + +class BNO055 {//class for imu + public: + BNO055(I2C i2c, int addr);//constructor + float readHeading(void);//class methods + float readRoll(void); + float readPitch(void); + char checkID(void); //Check for proper communication with sensor + void setMode(int modeCode); //Set program to NDOF forge mode + int setAngleUnits(int unitsCode); //Select Euler Angles as units + private: + I2C _i2c; + int _addr; + int _units; +}; + +#endif