Motion | lrf.motion
The Little Robot Friends have a built-in motion sensor or accelerometer. This is able to sense movement, or acceleration, in three axis: X, Y and Z.
Functions called from within the "motion" portion of the library have the prefix of lrf.motion
enable()
Description
This function enables the motion sensor and the subsequent events it triggers.
Examples
lrf.motion.enable();
Syntax
enable()
Parameters
none
Returns
none
Notes
none
disable()
Description
This function disables the motion sensor and the subsequent events it triggers.
Examples
lrf.motion.disable();
Syntax
disable()
Parameters
none
Returns
none
Notes
none
readX()
Description
This function returns the raw sensor value for the motions sensor's X axis.
Examples
lrf.motion.readX();
Syntax
readX()
Parameters
none
Returns
int8_t
Notes
none
readY()
Description
This function returns the raw sensor value for the motions sensor's Y axis.
Examples
lrf.motion.readY();
Syntax
readY()
Parameters
none
Returns
int8_t
Notes
none
readZ()
Description
This function returns the raw sensor value for the motions sensor's Z axis.
Examples
lrf.motion.readZ();
Syntax
readZ()
Parameters
none
Returns
int8_t
Notes
none