waitForGpioSignal v5.4
Before v5.4, this method was called waitForGpioCondition.
Wait until a GPIO signal reaches the specified state.
Parameter
| Key | Type | Description |
|---|---|---|
| name | string | Name of the GPIO signal. |
| active | boolean | The state to wait for. v6.0 |
| state | boolean | Deprecated name of active. |
| timeout | number | Optional timeout in seconds. If omitted, waits forever. |
Either active or state is required. Both may be given, as long as they
agree, so that the same request also works with versions before v6.0.
Return value
true if the signal reached the desired state; false if the timeout elapsed before the state was reached.
Example
waitForGpioSignal {"name": "MySignal", "active": true, "timeout": 5.0}