libkipr  1.0.0
Accelerometer

Functions

signed short accel_x ()
 Gets the sensed x acceleration. More...
 
signed short accel_y ()
 Gets the sensed y acceleration. More...
 
signed short accel_z ()
 Gets the sensed z acceleration. More...
 
int accel_calibrate ()
 

Detailed Description

The functions here allow for reading the accelerometer. The accelerometer measures acceleration in the x, y, and z directions.

Function Documentation

◆ accel_calibrate()

int accel_calibrate ( )

Initiates a calibration of the accelerometer

Note
Not Yet Implemented
Returns
1: success 0: failure

◆ accel_x()

signed short accel_x ( )

Gets the sensed x acceleration.

Wallaby: +/- 2G range, 1024 per G

Wombat: +/- 2G range, 1024 per G

This should be approximately 0 when at rest and flat on a table

Returns
The latest signed x acceleration value

◆ accel_y()

signed short accel_y ( )

Gets the sensed y acceleration.

Wallaby: +/- 2G range, 1024 per G

Wombat: +/- 2G range, 1024 per G

This should be approximately 0 when at rest and flat on a table

Returns
The latest signed y acceleration value

◆ accel_z()

signed short accel_z ( )

Gets the sensed z acceleration.

Wallaby: +/- 2G range, 1024 per G

Wallaby: This should be approximately -1024 when at rest and flat on a table

Wombat: +/- 2G range, 1024 per G

Wombat: This should be approximately -512 when at rest and flat on a table

Returns
The latest signed z acceleration value