Chapter 9
Android Door Lock
Tired of carrying around old-fashioned metal keys to your home? You’re probably already carrying a smartphone. Wouldn’t it be much more convenient to open your front door via an app that you built for your smartphone instead? Wouldn’t it also be a nice security feature to take a photo of the person(s) unlocking your door with this app and email that captured photo as an attachment to yourself? (See Figure 36, Open doors wirelessly using a smartphone.)
In this project, we are going to use an inexpensive, first generation Android phone. We will connect it to a Sparkfun IOIO (“yo-yo”) board and a relay switch to operate an electrified door latch. The first-gen Android phone will run a server that will respond to your unlock requests sent from a second Android phone running the door unlock client. When the unlock request is triggered, the server phone will snap a photo using the phone’s built-in camera and silently email the captured image to you. Let’s go and make it!

Figure 36. Open doors wirelessly using a smartphone