Raspberry Pi Smart Mirror

Engineer

Lauren L

Area of Interest

Computer Science

School

Urban High School

Grade

Incoming Senior

Reflection

Bluestamp showed me the simplicity of engineering because every problem I ran into had a concrete and logical solution. For example, when I had to create a new python file to connect the raspberry pi and smart mirror, writing different parts of code was simple. Furthermore, Bluestamp also helped me see the power of small steps. After I learned to download one module, I could easily download more and edit them whenever I would like. Even though writing a new file was challenging, fixing code that didn’t work taught me more than the code that did. These two lessons provided me with the insight that engineering is about combining successes and failures to create the best possible solution.

Final Milestone

This past week, I focused on changing the interface and mounting each of the parts on to the frame. I changed the configuration file and downloaded code to install the quote of the day module. The most challenging part of my third milestone was mounting the different parts of the smart mirror. I used a drill and drill bit to screw in the wooden planks to ensure that I could take any part of the frame out when needed. The planks now hold the monitor, speaker, and raspberry pi in place. In the current set up, there is little space between the back of the mirror and the wood, so the monitor often scratches the mirror when I put it in. I made the wood planks adjustable, which sometimes prevents the mirror from getting scratched. Unfortunately, burning my camera prevented my facial recognition algorithm from being shown in the final demo. 

Lauren L. Final Milestone

Second Milestone

This week, I focused on adding facial recognition to my smart mirror. I began by using a website called Nanonets to teach a camera how to recognize my face. It was a long process, which involved drawing a box around each face in 500 photos of myself and other people from the internet. Nanonets now reports an accuracy of 82%, though this number fluctuated over time. To connect the facial recognition algorithm and the Magic Mirror code, I copied the API token and python code from Nanonets. I then wrote code to turn on the mirror when my face is there and off 20 seconds after I leave the camera’s view. 

Next, I created a wooden frame. With a miter box and hand saw, I cut 2 pieces of wood that were 13.75 inches long and another two that were 12 inches long to create the back of the frame. The front of the frame is made from two 15-inch pieces of wood and two 13.75-inch pieces, which were cut at a 45 degree angle. The measurements of the wood were made to ensure that the mirror would fit inside. Each piece of wood has a height of 0.75 inches and a width of 1.5 inches. Lastly, I changed the digital interface to have a different calendar format with a module called MMM-MyCalendar. I also changed the clock from San Francisco in the Philippines to San Francisco in California. I plan to continue editing and changing the position of modules to act as an alarm clock.

Lauren L Milestone 2

First Milestone

After connecting the keyboard and mouse to the monitor, I downloaded the Raspberry OS Software on a micro SD card, which I placed into the Raspberry Pi. I used VNC viewer to copy code from the Magic Mirror2 website onto the Raspberry Pi terminal. I began customizing the Smart Mirror interface by adding the youtube module MMM-ScreenCast and downloading the youtube app on my iPhone. I edited the configuration file in my magic mirror to display youtube videos at the center of the screen with a height of 600 pixels and 10,000 pixels. Next, I added the Spotify module. Similarly to the Youtube Module, I followed the GitHub instructions and edited the configuration file to display the Spotify module on the left-hand side of my monitor. Lastly, I added the Google Calendar module by replacing the existing calendar link with the link to my google calendar’s Secret Address in iCal format. (Any google calendar’s Secret Address can be found by pressing the settings button at the upper right corner, specifying the calendar under the Settings for my Calendar section, then scrolling to  the bottom. Using the Secret Address prevents the possibility of making the google calendar public to receive Calendar Data.) While the Spotify module appears on the interface, the long list of events I have on my google calendar pushes the Spotify Module to the bottom of the monitor, so I plan to resize the modules. In addition, I plan to add in facial recognition with the website Nanonets.

Lauren L Milestone 1

Start typing and press Enter to search

Bluestamp Engineering