Firmware · GPIO in practice

Polling and edge detection

Counting button presses means telling when a press starts, not just that the button is down, and the loop speed matters here.