Reference Language | Libraries | Comparison | Changes
Reads values from the Esplora's accelerometer. Each of the three axes are accessed independently.
Esplora.readAccelerometer(axis)
axis : char, determines what axis to read.
X_AXIS | to read the X-axis value |
Y_AXIS | to read the Y-axis value |
Z_AXIS | to read the Z-axis value |
int : the value of the readings on the chosen axis. The accelerometer returns zero when it is perpendicular to the direction of gravity. Positive or negative values result when it is accelerates in one of the two directions of the axis.
Corrections, suggestions, and new documentation should be posted to the Forum.
The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.