The button state should be the same in both if statements. This is because you are looking to do something different on each push, not something on a push and something on a release.
The button state should be the same in both if statements. This is because you are looking to do something different on each push, not something on a push and something on a release.