Skip to main content

waitForGpioCondition

Wait until a GPIO condition reaches the specified state.

Parameter

KeyTypeDescription
namestringName of the GPIO condition.
statebooleanThe state to wait for.
timeoutnumberOptional timeout in seconds. If omitted, waits forever.

Return value

true if the condition reached the desired state; null if the timeout elapsed before the state was reached.

Example

waitForGpioCondition {"name": "MyCondition", "state": true, "timeout": 5.0}