This is the source code of the project which I and my team created to open doors using pattern lock (similar to pattern lock on phones) using an ARDUINO UNO board.
Refer the circuit Diagram and use a LCD Screen and a Servo Motor.
Change the Default pattern if you wish to.
Run it.
Servo works(Door opens) only for correct pattern and wrong patterns are ignored.