D13 is used as input
Arduino NANO has a built-in LED connected to D13, therefore it's not a suitable pin to be used as input (or be used at all, even to drive LEDs). A new pin for SW2 needs to be selected.
Arduino NANO has a built-in LED connected to D13, therefore it's not a suitable pin to be used as input (or be used at all, even to drive LEDs). A new pin for SW2 needs to be selected.