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

Get single magnetometer value

  • Dark
  • PDF

Article Summary

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

Input arguments

Update sensor variablesupdateSensorVarsBooleanYestrueIf true, the new value will also be stored into sensorVars.magentometer.latestValue and sensorVars.magentometer.values.

Output arguments

Number of outputs: 2

Magnetometer valuevalueObjectValue of the device magnetometer when the flow function was called.
  • X field
value.xNumberMagnetic field of the device along its X axis, in microteslas.
  • Y field
value.yNumberMagnetic field of the device along its Y axis, in microteslas.
  • Z velocity
value.zNumberMagnetic field of the device along its Z axis, in microteslas.
  • timestamp
value.timestampStringISO 8601 timestamp of when the value was read.


No events.


Unknown errorunknownThrown when calling the native API resulted in an unknown error.

Was this article helpful?

What's Next