The state change detection example (in the IDE examples) shows how to detect when the button becomes pressed and becomes released (as opposed to when the button is pressed or released).
The state change detection example (in the IDE examples) shows how to detect when the button becomes pressed and becomes released (as opposed to when the button is pressed or released).