Reference   Language | Libraries | Comparison | Changes

CurieIMU

setDetectionThreshold()

Description

Sets the value of the detection threshold.

Syntax

CurieIMU.getDetectionThreshold(int feature, float value)

Parameters

feature: the requested feature. It can assume one of these values:

  • CURIE_IMU_FREEFALL
  • CURIE_IMU_SHOCK
  • CURIE_IMU_MOTION
  • CURIE_IMU_ZERO_MOTION
  • CURIE_IMU_TAP


value: the value to be set, expressed in mg, according to the accelerometer range set, as follows:

CURIE_IMU_FREEFALL
3.91 to 1995.46 mg, in steps of 7.81 mg


CURIE_IMU_SHOCK
2G: 3.91 to 1995.46 mg, in steps of 7.81 mg
4G: 7.81 to 3993.46 mg, in steps of 15.63 mg
8G: 15.63 to 7984.38 mg, in steps of 31.25 mg
16G: 31.25 to 15968.75 mg, in steps of 62.50 mg

CURIE_IMU_MOTION
2G: 0 to 997.05 mg, in steps of 3.91 mg
4G: 0 to 1991.55 mg, in steps of 7.81 mg
8G: 0 to 3985.65 mg, in steps of 15.63 mg
16G: 0 to 7968.75 mg, in steps of 31.25 mg

CURIE_IMU_ZERO_MOTION
2G: 0 to 997.05 mg, in steps of 3.91 mg
4G: 0 to 1991.55 mg, in steps of 7.81 mg
8G: 0 to 3985.65 mg, in steps of 15.63 mg
16G: 0 to 7968.75 mg, in steps of 31.25 mg

CURIE_IMU_TAP
2G: 31.25 to 7968.75 mg, in steps of 62.5 mg
4G: 62.50 to 31937.50 mg, in steps of 125.0 mg
8G: 125.0 to 63875.00 mg, in steps of 250.0 mg
16G: 250.0 to 127750.00 mg, in steps of 500 mg

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.