Get single magnetometer value
- 18 May 2022
- 1 Minute to read
- DarkLight
- PDF
Get single magnetometer value
- Updated on 18 May 2022
- 1 Minute to read
- DarkLight
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
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. |
| value.x | Number | Magnetic field of the device along its X axis, in microteslas. |
| value.y | Number | Magnetic field of the device along its Y axis, in microteslas. |
| value.z | Number | Magnetic field of the device along its Z axis, in microteslas. |
| 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?