40 lines
814 B
C++
40 lines
814 B
C++
#ifndef MOVEMENTSENSORCODE_SENSORMANAGER_H
|
|
#define MOVEMENTSENSORCODE_SENSORMANAGER_H
|
|
|
|
#include "Arduino.h"
|
|
#include "SparkFun_BNO080_Arduino_Library.h"
|
|
|
|
// declare the class SensorManager with all functions
|
|
class SensorManager {
|
|
public:
|
|
SensorManager();
|
|
void sensorSetup();
|
|
struct eulerAngles {
|
|
float roll;
|
|
float pitch;
|
|
float yaw;
|
|
};
|
|
struct acceleration {
|
|
float x;
|
|
float y;
|
|
float z;
|
|
};
|
|
// void sendData(float roll, float pitch, float yaw);
|
|
eulerAngles getEulerAngles();
|
|
acceleration getAcelleration();
|
|
bool sensorTap();
|
|
|
|
private:
|
|
|
|
struct RotationQuaternions {
|
|
float i;
|
|
float j;
|
|
float k;
|
|
float w;
|
|
};
|
|
RotationQuaternions getQuaternions(); // get the quaternions from the sensor
|
|
|
|
BNO080 myIMU;
|
|
};
|
|
|
|
#endif // MOVEMENTSENSORCODE_SENSORMANAGER_H
|