Get single compass value
- 18 May 2022
- 1 Minute to read
-
DarkLight
-
PDF
Get single compass value
- Updated on 18 May 2022
- 1 Minute to read
-
DarkLight
-
PDF
Get a single reading from the device compass. By default, updates sensorVars.compass.latestValue
and sensorVars.compass.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.compass.latestValue and sensorVars.compass.values . |
Output arguments
Number of outputs: 2
Label | Key | Type | Description |
---|---|---|---|
Compass value | value
|
Object | Value of the device compass when the flow function was called. |
|
value.heading
|
Number | The direction in which the device is facing, given as degrees from true north. 0 degrees represents true north, and the direction is determined clockwise (which means that east is 90 degrees and west is 270 degrees). |
|
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?