Push Button Code Lock with Blynk Control

Here is a little bit of code to make a single push button combonation lock.

Basically I want to lock my shed with a electronic dead bolt lock, and all I want on the outside is a single push button to unlock it. The ESP will be running the code, but not be dependent on Blynk to be connected so that It works even if the connection is broken.

The idea is that you can do a simple combination push code with the single button. My example below is simple in that you must hold the button down for BUTTON_HOLD_DUR (in this example I use 4sec), then you must let go, and push the button 4 times (BUTTON_CODE) with-in the BUTTON_TIMEOUT (which is 2sec).

If you do this all correct, without any feed back (for security reasons, dont want to let the burglars know they made progress on the lock by making it beep etc), then the lock will unlock!

Latest code: https://github.com/jaminNZx/Push-Button-Code-Lock/releases/tag/v0.1


Hate to raise the dead, this looks cool, did you try something like this but with a rotary encoder? Kind of like opening a safe :stuck_out_tongue:

A Blynk controlled digital rotary safe lock sounds like a project which could be very popular!

1 Like