Smart Dorm Lock

A mobile app used to unlock my dorm door without a physical key

React NativeReduxC++ArduinoIOT

Video Demo

What is it?

When I lived in the dorms at Sac State, I consistently locked myself out of my dorm due to the locks used for their doors. My go-to method was to bend some coat hangers, slide it under the door, and attempt to pull the handle inside my room. It wasn't successful most of the time. The residence halls charge $40 for each spare key request and I didn't want to pay for that again.

So I did what any enthusiatic Computer Science student does and programmed a solution. I bought an Arduino, an HC-05 module, a soldering kit, and a strong servo and built a device to open my dorm door. I created an iOS/Android app that connects to the Arduino via bluetooth and sends a request to unlock the door.

Until I finally moved out, I used the app to unlock my dorm door.

What was this built with?

The arduino bluetooth app was built with React Native for the mobile app with Redux for state management. An Arduino was used to control the servo in C++. An HC-05 module was used so that the React Native app could communicate with the Arduino via bluetooth.

What were the biggest challenges?

I have only worked with IOT once before this, so I chose something that was simple that was still a challenge. The first step was to learn how to control a servo using Arduino. Thankfully this was very straightforward.

The biggest challenge was figuring out how an HC-05 module works. I soldered the module to the arduino board with a voltage divider based on diagrams available online. I then went to work on the React Native app.

The React Native app is very simple: A user pushes a button and it sends a payload to the Arduino over bluetooth. After finding a reliable bluetooth node_module, I was able to connect to the Arduino and send data to it.

What did I learn?

I learned how to take an actual problem I had and apply a solution. Despite only having a small amount of experience with Arduino, I managed to get a working prototype that I used over the course of the semester.

Having never done a tech talk, I was requested to do a talk at a local meetup about how one could enter the world of IOT using an Arduino and React Native

You can view the meetup post here.

Check out the source code: