See the first part of this tutorial about how to use INPUT_PULLUP mode with a button. It shows how to wire diagonally across the button to guarantee you pick up switched legs.
See the first part of this tutorial about how to use INPUT_PULLUP mode with a button. It shows how to wire diagonally across the button to guarantee you pick up switched legs.