What does your serial output look like?
You really should look at the state change detection example, to deal with when a pin BECOMES high, not IS high.
What does your serial output look like?
You really should look at the state change detection example, to deal with when a pin BECOMES high, not IS high.