Unlocking a door with an iPhone
I first had the idea to do this over a year ago when I faced the problem of having to juggle my keys to find the right one. Doing this everyday took too long, especially when I always arrived at my door with my phone in hand. I began to search: ‘unlocking a door with an iPhone’ and came across a couple of products which achieved my goal and solved my problem. However, I wanted to learn and build a solution more than paying for it.
After my classmate Jason overheard my idea while explaining it to someone, he asked if we could work together to create this solution and I agreed.
What’s needed to start?
- iPhone, MacBook + Xcode
- Particle Photon + Micro USB to USB cable
- Breadboard + a couple LEDs and resistors
- Electric door strike
Since Jason and I already have the knowledge of how to build an iPhone app with Xcode, we needed to learn how to use and program the Particle Photon. After setting it up and tinkering with the Photon for two hours, we created a simple function and user interface on the iPhone to turn two LEDs on and off.
Here it is:
- Particle’s guide for setup instructed the user to entire this line in the command prompt: ‘npm install -g particle-cli’ and we encountered an error ‘Please try running this command again as root/Administrator’. The solution for that is: ‘sudo npm install -g particle-cli’. Typing ‘sudo’ runs a command as the root/Administrator.
The next steps:
- Soldering wires to and from the Photon to the electric door strike, allowing the mechanism of the door strike to ‘unlock’
- Wireframe the user interface
- Creating a backend allowing multiple users to use this app (i.e landlords giving new tenants access to their building)