Embedded accelerometer.
More...
#include <Acc.h>
|
| Acc () |
| Constructs an Accelerometer. More...
|
|
| ~Acc () |
|
void | x (double &v) |
| Read the accelerometer value on the x axis. More...
|
|
void | y (double &v) |
| Read the accelerometer value on the y axis. More...
|
|
void | z (double &v) |
| Read the accelerometer value on the z axis. More...
|
|
void | all (double &x, double &y, double &z) |
| Read the accelerometer value on each axis. More...
|
|
|
void | readAcc (int, double &) |
| Get the acceleration for an axis. More...
|
|
Embedded accelerometer.
- Examples
- example_acc.cpp, project_angle.cpp, and project_pendulum.cpp.
Definition at line 13 of file Acc.h.
◆ Acc()
Constructs an Accelerometer.
Set the scale to the default (1/256)
Definition at line 10 of file Acc.cpp.
◆ ~Acc()
◆ all()
void Acc::all |
( |
double & |
vx, |
|
|
double & |
vy, |
|
|
double & |
vz |
|
) |
| |
Read the accelerometer value on each axis.
- Parameters
-
vx | Acceleration on x axis |
vy | Acceleration on y axis |
vz | Acceleration on z axis |
- Examples
- example_acc.cpp.
Definition at line 62 of file Acc.cpp.
◆ readAcc()
void Acc::readAcc |
( |
int |
type, |
|
|
double & |
v |
|
) |
| |
|
private |
Get the acceleration for an axis.
- Parameters
-
type | One of ACCXVAL, ACCYVAL or ACCZVAL |
v | The return value, passed by reference |
Definition at line 19 of file Acc.cpp.
◆ x()
void Acc::x |
( |
double & |
v | ) |
|
Read the accelerometer value on the x axis.
- Parameters
-
v | The result is given by reference for speed |
Definition at line 36 of file Acc.cpp.
◆ y()
void Acc::y |
( |
double & |
v | ) |
|
◆ z()
void Acc::z |
( |
double & |
v | ) |
|
◆ scale
Definition at line 24 of file Acc.h.
The documentation for this class was generated from the following files:
- C:/Users/jackb/OneDrive - etu.univ-lyon1.fr/TERi/Eclipse/workspace/APIForRIO/src/Acc.h
- C:/Users/jackb/OneDrive - etu.univ-lyon1.fr/TERi/Eclipse/workspace/APIForRIO/src/Acc.cpp