Your code layout makes it very difficult what your control structure is.

Please adopt the habit of putting each { and } on separate lines, with matching pair indented by the same amount, and with the code between them indented one extra level. It makes it much, much easier for us (and you) to understand the structure of the code and also to spot where the structure is not what you intended.

I only provide help via the forum - please do not contact me for private consultancy.

Your code layout makes it very difficult what your control structure is.

Please adopt the habit of putting each { and } on separate lines, with matching pair indented by the same amount, and with the code between them indented one extra level. It makes it much, much easier for us (and you) to understand the structure of the code and also to spot where the structure is not what you intended.

pls give me the answer coz my program didnt work. i repeat, there is no problem with the correct code. i only did that for representation (i know its wrong)

this is a very simple problem, though no one can answer even me.

the solution for my answer, i think...

check if the switch is highdelay (100)check if the switch still highdelay (100)check if the switch still highdelay (100)check if the switch still highturn on the led

woohooooooo. yes! it works! for all the answer out their. this is the only one made me smile , very good sir, thank you very much!. you only use looping but its the same with mine. what exactly is the one second as a delay? is it delay(1000)?. you really help me sir. thank you very much.

Im sorry jaylisto, The program that i gave to you does not do what you need it to do. I thought you need to press the switch 3 time b4 the led will light up. so its does not do acording to what you want.btw i want to say its not good that you anger all those post a reply for your question. those people have help me learn alot.