Get single accelerometer value
  • 18 May 2022
  • 1 Minute to read
  • Dark
    Light
  • PDF

Get single accelerometer value

  • Dark
    Light
  • PDF

Get a single reading from the device accelerometer. By default, updates sensorVars.accelerometer.latestValue and sensorVars.accelerometer.values.

Input arguments

Label Key Type Required? Default Description
Update sensor variables updateSensorVars Boolean Yes true If true, the new value will also be stored into sensorVars.accelerometer.latestValue and sensorVars.accelerometer.values.

Output arguments

Number of outputs: 2

Label Key Type Description
Accelerometer value value Object Value of the device accelerometer when the flow function was called.
  • X acceleration
value.x Number Acceleration along the X axis, in m/s².
  • Y acceleration
value.y Number Acceleration along the Y axis, in m/s².
  • Z acceleration
value.z Number Acceleration along the Z axis, in m/s².
  • timestamp
value.timestamp String ISO 8601 timestamp of when the value was read.

Events

No events.

Errors

Label Code Description
Unknown error unknown Thrown when calling the native API resulted in an unknown error.

Was this article helpful?