Long Press
medium
Fires a single-scan pulse when the input is released after being held continuously for at least 2 seconds.
What it teaches
Combines a hold-time timer with falling-edge detection on the input, gated by whether the timer reached preset before release. The action fires on release only when the hold qualified — the canonical mobile/UI long-press semantic. Teaches edge detection, timer threshold gating, and conditional event-on-release logic.
Parameters
| Tag | Direction | Type | Default | Description |
|---|---|---|---|---|
| In_Button | Input | BOOL | 0 | Push button input |
| Out_Pulse | Output | BOOL | 0 | High for one scan when button is released after a long press |
Required behavior
- Out_Pulse fires for one scan when In_Button transitions from 1 to 0 after being held at 1 for at least 2000ms.
- Out_Pulse remains 0 if In_Button is released before 2000ms of continuous hold.