Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: wheelchaircontrol wheelchaircontrolRosCom wheelchaircontrol wheelchaircontrol2 ... more
Fork of chair_BNO055 by
chair_BNO055.h
- Committer:
- jvfausto
- Date:
- 2019-04-19
- Revision:
- 5:a05d4bfb3060
- Parent:
- 4:a6452220ec66
- Child:
- 6:ce8aa8208590
File content as of revision 5:a05d4bfb3060:
#ifndef CHAIR_BNO055_H
#define CHAIR_BNO055_H
#include "filter.h"
#include "mbed.h"
#include "math.h"
#include "BNO055.h"
#define PI 3.141593
/*#define SDA D14
#define SCL D15*/
#define SDA D14
#define SCL D15
#define SAMPLEFREQ 50
#define CAL_TIME 3
class chair_BNO055
{
public:
chair_BNO055(Serial* out, Timer* time);
chair_BNO055(PinName sda_pin, PinName scl_pin, Serial* out, Timer* time);
void setup();
double accel_x();
double accel_y();
double accel_z();
double gyro_x();
double gyro_y();
double gyro_z();
double angle_north();
double yaw();
double pitch();
double roll();
BNO055* imu;
private:
//BNO055* imu;
Serial* usb;
Timer* t;
bool start;
void setStart();
void calibrate_yaw();
};
#endif
