Door opens after doorbell is pushed 3 times in a row.

Hello,
I try to figure out how to make this project.

Based on this video: Open, Sesame - entry phone hack - YouTube

However, I don't care about the voices I just need that the door opens.

I will replace directly my interphone by the arduino.

My idea was If arduino listens at a digital input 3 times in a row over a period of time of 6 seconds, then arduino send an Output signal to open the entrance door.

I know how to make this with just 1 digital INPUT but how to introduce my conditions just above explained?

Thanks guys :slight_smile: :slight_smile:

use blink without delay for your timing

if tone is heard start timing
silence = duration of tone.

I would expect that you can time the tone for the first button press

obviously, at the end of the button press is no tone

if buttonPress1 > 0.0 and < 0.5 this is a short tone
button1value = 1

if buttonPress1 > 0.5 and < 1 this is a long tone
button1value = 2

if pause between tones > 2 // you waited too long and the system rests
button1value = 0
button2value = 0
button3value = 0

if button1value = 2
if button2value = 1
if button3value = 2
then password is correct, open door

if the pause after buttonpress1 is >0.1 and <0.5, then the next button press goes into button2value

Thanks for your time and answer Dave !

Actually I would need something easier than in the video.

I just need 3 digital inputs in a row in a 5 seconds time period.
(beeeep, beeep, beeeep) between 0 and 5 s.
No need to measure silence.

If this is realized then door opens.
If that condition is not realized then door remains closed

when the button is pressed, the tone is heard
when released, the tone ends silence begins

use whatever words you like, button is pressed, signal starts
release button, signal ends

if the was a short pulse, then that = 1
if it were long then it equals 2
if no pulse for say 5 seconds,. then all numbers = 0

if you can have the Arduino light an LED when the button is pressed, you hasve a great start.

read blink without delay to find about counting times.