The most significant Computer Science Project I worked on was building a Smart doorbell. My house doorbell stopped working after hurricane Sandy and my dad was always too busy to fix it. Therefore, I decided to fix it myself and make it smarter. I was enrolled in Engineering II at Bard Early College, where I was learning about the Arduino Microcontroller. I used my knowledge from class to fix the doorbell.
I got out a piece of paper and started to plan how I was going to design the doorbell. I decided to make the doorbell play a loud sound in the kitchen informing whoever inside the house that someone is at the door. I also decided to make the doorbell send a message to everyone's phone. There is a time-stamp that informs the person what time the doorbell rang.
After I planned what I was going to do, I realized that to get the button to play a sound, I would have to run a wire from the front and back door to the kitchen, which would have been a design flaw because my mom always complains about wires running throughout the house. I used a radio transmitter and receiver to communicate a 1 or 0 to another Arduino in the kitchen indicating that the bell was pushed. Also, to send this message over to the cell phone, I had to use representational state transfer (REST). The Arduino doesn't come with any internet connectivity, so I had to buy an internet shield to connect the Arduino to the internet. The Arduino REST Application Programming Interphase (API) makes it easy to send data to a server using PHP POST or GET methods. I created a free web host server with an MYSQL database, which gets updated every time the user pushes and releases the doorbell. I wrote PHP code so that every time the doorbell is pushed, it would echo JavaScript Object Notation JSON to a web page.
After rigorous testing, I realized that the free Webhost was not sending the data to the server correctly. I had to devise a better way to host my own server. After researching online, I found that the Arduino Yun had everything I was looking for. The Yun had an atmega328 chip that does normal Arduino things, a Linux chip that acts like a normal computer with some Linux tools preinstalled, and SD card slot that allowed me to store data. By connecting to my home network, it acts like a mini server that receives and send data. Now I had to get the data from the Arduino Yun to my phone. I used the Android Volley (API ) to connect to and get data from the server. I designed the app so that it would run in the background of the user phone and listen for an event on the server. From this project, I learned a lot about REST and how I could use REST to communicate with other devices.