Most of us are familiar with ‘Pattern lock’ which is one of the popular security features on Android phones. I wanted to create something similar for Arduino and here is the basic demo that I got working.
I used a Arduino Mega board and 3.2″ LCD TFT Module with 4 Wire resistive touch screen to build this small demo.
The application primarily has 2 screens. One for ‘setting the pattern’ (record mode) and the other for unlocking (lock mode). In both these cases, the screen is virtually divided into a 3×3 grid of hot spots which are displayed as circles on the LCD. In the record mode, the sequence of touchscreen interactions on these hot spots is captured and saved as a pattern. In the lock mode, the pattern drawn by the user is matched with saved pattern to the unlock application. I have tried to make it look like ‘Android pattern lock’ but I guess it is not yet there and needs refinements.
In the video below, you see the demo of unlocking using the pattern. The video also shows how one can record their own unlock patterns.
The code that I currently have is not very clean; will try to tidy up the code when I get some time.
Please post your feedback / suggestions in the comments.