Skip to main content

waitForGpioSignal v5.4

Before v5.4, this method was called waitForGpioCondition.

Wait until a GPIO signal reaches the specified state.

Parameter​

KeyTypeDescription
namestringName of the GPIO signal.
activebooleanThe state to wait for. v6.0
statebooleanDeprecated name of active.
timeoutnumberOptional 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}