Reference   Language | Libraries | Comparison | Changes

CurieIMU

shockDetected()

Description

Returns true if a shock is detected.

Syntax

CurieIMU.shockDetected(int axis, int direction)

Parameters

axis: the axis to check for shock detection. It must have one of these values:

  • X_AXIS
  • Y_AXIS
  • Z_AXIS

direction: the direction to check for shock detection. It must have one of these values:

  • POSITIVE from zero to positive axis values
  • NEGATIVE from zero to negative axis values

Return

True or false if the shock is detected or not on the axis and direction specified.

See also

Reference Home

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.

Share