Hi guys. Can i get an example code for situation below.
if the switch is press, led red will turn on for 3 seconds, then end process.
if the switch is not press, led green will turn on for 3 seconds then end process.
Ive been struggling to do the code.
I use 1 button switch, 1 green led & 1 red led.