ReferenceScripting APIMotionScenesensor
MotionScene.sensor
methodThe latest reading of one of the scene's sensors (those its Sensors tab lists).
| Name | sensor |
|---|---|
| Kind | method of MotionScene |
| Called as | scene.sensor(…) |
| As a node | Get Sensor Reading (logic graph) |
| Since | 0.3 |
Syntax
sensor(name: string): { value: any; at: number } | nullParameters
| Name | Type | Description |
|---|---|---|
name | string | The name it's shared as ("pulse"), or its sensor's id ("heart_rate") |
Returns
{ value: any; at: number } | null: (at: ms since 1970), or null before a reading.
See also
In examples: Pulse
Notes from the community
Written by creators and checked by the docs' editors. Not part of Motion's official reference.