Firmware for Arduino | PLEN Project Company Inc.
AccelerationGyroSensor.h
Go to the documentation of this file.
1 
8 #pragma once
9 
10 #ifndef PLEN2_ACCELERATION_GYRO_SENSOR_H
11 #define PLEN2_ACCELERATION_GYRO_SENSOR_H
12 
13 
14 #include <stdint.h>
15 
16 namespace PLEN2
17 {
19 }
20 
25 {
26 private:
27  enum SENSOR_VALUE_MAP
28  {
29  ACC_X,
30  ACC_Y,
31  ACC_Z,
32  GYRO_ROLL,
33  GYRO_PITCH,
34  GYRO_YAW,
35  SENSORS_SUM
36  };
37 
38  int16_t m_values[SENSORS_SUM + 1];
39 
40 public:
57  bool sampling();
58 
67  const int16_t& getAccX();
68 
77  const int16_t& getAccY();
78 
87  const int16_t& getAccZ();
88 
97  const int16_t& getGyroRoll();
98 
107  const int16_t& getGyroPitch();
108 
117  const int16_t& getGyroYaw();
118 
134  void dump();
135 };
136 
137 #endif // PLEN2_ACCELERATION_GYRO_SENSOR_H
Definition: AccelerationGyroSensor.h:16
const int16_t & getGyroPitch()
Get angular velocity of pitch axis (rotation axis on Y axis)
const int16_t & getGyroRoll()
Get angular velocity of roll axis (rotation axis on X axis)
const int16_t & getAccY()
Get acceleration on Y axis.
const int16_t & getGyroYaw()
Get angular velocity of yaw axis (rotation axis on Z axis)
bool sampling()
Do sampling sensor values.
void dump()
Dump all sensors' value after sampling.
const int16_t & getAccX()
Get acceleration on X axis.
Management class of acceleration and gyro sensor.
Definition: AccelerationGyroSensor.h:24
const int16_t & getAccZ()
Get acceleration on Z axis.