If switch is pressed once, LED will blink once and buzzer will buzz once.
If switch is pressed twice, LED will blink twice and the buzzer will buzz twice.
guys help me to code this..
If switch is pressed once, LED will blink once and buzzer will buzz once.
If switch is pressed twice, LED will blink twice and the buzzer will buzz twice.
guys help me to code this..
Jeremiah08:
guys help me to code this..
Forget the code for a moment.... write down how it would work in plain English. Have a friend standing by to make a buzzing sound. You pretend to activate the button by knocking on the table. You knock once: your friend hears that but how does s/he know if it's time to buzz or wait for another knock.
Figure that out and the coding's simple.
Hint: You need to agree what the maximum gap is between knocks, your friend should look at the clock when you knock the first time.
PS: this is an Arduino forum so a subject title "Arduino" is pretty useless.
@ardy_guy
nice explanation