My code doesn't work.

TomGeorge:
Hi,
Welcome to the forum.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

How have you got your switch wired?
Your code looks as though you have a button from the Arduino input to 5V, do you have a 10k pull down resistor between the Arduino input and gnd to make sure the input goes to gnd when the button is not pressed?

What model Arduino are you using?

Thanks.. Tom... :slight_smile:

I use an Arduino Nano
And btw none of the lights go on now.