If you replace the relay and transistor with a LED and resistor, does the LED turn on and off?When I replace the relay and transistor with a LED and resistor (220 Ohm), and run the program, the LED does turn on and off,
however it doesn't work on pin 13 (switch) and pin 12 (relay) but only on pin 4 (switch) and pin 2 (relay). Does it mean that that I
messed the Arduino?
I have more difficulties here: the switch isn't so good and I realise yesterday that that if I replace the switch with two wires on the breadboard, then LED works always right, however I don't understand why turn on/off LED when the "switch" is off (LOW) and not when the "switch" is on (HIGH)? Regarding to the programcode it should works in another way instead.
Yesterday I soldered the end of wires so that I get more reliable connections on breadboard and Arduino connectors.
Sorry for my mistake, I realised these days that , that I did put instead a normal diode a zenner diode to protect the relay. Sorry, I'm a newbe in electronics. So now I replace the zenner diode with the 1N407 diode.