The 3-axis Digital Accelerometer is the key part in projects like orientation detection, gesture detection and Motion detection. It provides readings in x-, y-, and z-axis orientations in terms of "g"s.
Hardware
If you are using the Grove Beginner Kit, your 3-axis Accelerometer sensor is already connect to an I2C port on your Arduino. If it has been "broken out" or you are using an external sense, connect it into any of the I2C ports on your Beginner Kit shield:
Software
Functions that interact with the barometer are prefixed with three_axis_
.
X-Axis
You can use the accelerometer to get gravitational force in x-axis direction:
"""Get acceleration in x-axis from Grove Beginner Accelerometer."""
def three_axis_get_accelX()
Y-Axis
You can use the accelerometer to get gravitational force in y-axis direction:
"""Get acceleration in y-axis from Grove Beginner Accelerometer."""
def three_axis_get_accelY()
Z-Axis
You can use the accelerometer to get gravitational force in x-axis direction:
"""Get acceleration in z-axis from Grove Beginner Accelerometer."""
def three_axis_get_accelZ()