Physical connection of buttons, switch, There are many schemes out there, it is like the Leo Bodnar in my case connect an on-off-on switch that has 3 pins, the ones at the ends go the digital pins (avoid 1,2 (RX / TX) and 13 the rest the ones you want) and the middle one to GND (ground) .In this case they are on pins 8 and 9.