I just realized a potential problem with using the switch and pot in series, if I adjust the pot so the voltage is below 3v the switch will be considered filliped and the lights will stop.
If I attached the pot to 5v pin and A2 , then the switch to 5V and A1 could I still use this if statement above for the button ?
Thanks !