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

Get single magnetometer value

  • Dark
  • PDF

Get a single reading from the device magnetometer. By default, updates sensorVars.magnetometer.latestValue and sensorVars.magnetometer.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.magentometer.latestValue and sensorVars.magentometer.values.

Output arguments

Number of outputs: 2

Label Key Type Description
Magnetometer value value Object Value of the device magnetometer when the flow function was called.
  • X field
value.x Number Magnetic field of the device along its X axis, in microteslas.
  • Y field
value.y Number Magnetic field of the device along its Y axis, in microteslas.
  • Z velocity
value.z Number Magnetic field of the device along its Z axis, in microteslas.
  • timestamp
value.timestamp String ISO 8601 timestamp of when the value was read.


No events.


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

Was this article helpful?

What's Next