Management class of acceleration and gyro sensor. More...
#include <AccelerationGyroSensor.h>
Public Member Functions | |
bool | sampling () |
Do sampling sensor values. More... | |
const int16_t & | getAccX () |
Get acceleration on X axis. More... | |
const int16_t & | getAccY () |
Get acceleration on Y axis. More... | |
const int16_t & | getAccZ () |
Get acceleration on Z axis. More... | |
const int16_t & | getGyroRoll () |
Get angular velocity of roll axis (rotation axis on X axis) More... | |
const int16_t & | getGyroPitch () |
Get angular velocity of pitch axis (rotation axis on Y axis) More... | |
const int16_t & | getGyroYaw () |
Get angular velocity of yaw axis (rotation axis on Z axis) More... | |
void | dump () |
Dump all sensors' value after sampling. More... | |
Management class of acceleration and gyro sensor.
void PLEN2::AccelerationGyroSensor::dump | ( | ) |
Dump all sensors' value after sampling.
Output result in JSON format as below.
const int16_t& PLEN2::AccelerationGyroSensor::getAccX | ( | ) |
Get acceleration on X axis.
const int16_t& PLEN2::AccelerationGyroSensor::getAccY | ( | ) |
Get acceleration on Y axis.
const int16_t& PLEN2::AccelerationGyroSensor::getAccZ | ( | ) |
Get acceleration on Z axis.
const int16_t& PLEN2::AccelerationGyroSensor::getGyroPitch | ( | ) |
Get angular velocity of pitch axis (rotation axis on Y axis)
const int16_t& PLEN2::AccelerationGyroSensor::getGyroRoll | ( | ) |
Get angular velocity of roll axis (rotation axis on X axis)
const int16_t& PLEN2::AccelerationGyroSensor::getGyroYaw | ( | ) |
Get angular velocity of yaw axis (rotation axis on Z axis)
bool PLEN2::AccelerationGyroSensor::sampling | ( | ) |
Do sampling sensor values.
Usage assumption is to call the method at stated periods from loop().