Get Sensor Reading
The latest reading of one of the scene's sensors (those its Sensors tab lists), when it came (ms) and whether there is one.
ƒGet Sensor Reading
SensorpulseResult
When
Has One
Inputs
| Pin | Type | Starts at | Notes |
|---|---|---|---|
Sensorsensor | text | "pulse" | – |
Outputs
| Pin | Type |
|---|---|
Resultvalue | any |
Whenat | number |
Has Onehas | bool |
The code it becomes
The graph below written as a script would write it.
// On Scene Startscene.log(((scene.sensor("pulse") || { value: null }).value));In a graph
◆On Scene Start
ƒGet Sensor Reading
SensorpulseResult
When
Has One
ƒPrint
In Text
The node with what starts it and Print to show what it gives, as Studio draws them.
Related
Notes from the community
Written by creators and checked by the docs' editors. Not part of Motion's official reference.