Button not working correctly. Static bool, Potentiometer. uno

Ya I should have picked up on that sooner, I was focused on saving pins, but since I'm going to use two boards I have some pins to spare.

so from everyone's feed back this is my new wiring diagram for the pot and switch.


2 question:

  1. can I connect the switch to an analog or pin, say A3 ? (how could I code A3 to supply voltage would that be the led flag) ?

  2. If so, would I use the conditional approach or the Ledflag ?

conditional

Ledflag

Thanks !