This is a website about Nash's Smart Mirror
I am working a smart mirror. This project will grab the date, time, weather, to-do list, and stock market and display them on a monitor behind the mirror.
Engineer | School | Area of Interest | Grade |
---|---|---|---|
Nash W | Saratoga High School | Computer Science | Incoming Junior |
After finishing this project, I have learned that I want to pursue computer science in the future. I definitely like software more than hardware. I am also more interested in the backend instead of the frontend in a project. I also learned about the power of a raspberry pi. It is very small and has enough power to display code which I will definitely use on my future projects.
My final milestone is creating the stock quote, calendar, and hot glueing the display onto the mirror. The stock quote is similar to the other functions because it is just using information from the API. I added the calendar by pushing numbers into an array and displaying them. I changed the font size and downloaded a new font from the internet. Since the mirror is two-way, I am able to see the display behind the mirror if there is enough light.
This is the code for changing the price of the stock quote and changing its color depending on the change in price. If the first character is ‘-‘(negative change), then all the text will be red. Otherwise, all the text will be returned as green, meaning ‘+’(positive change).
This is the code for collecting the numbers of a calendar and pushing them into an array.
This is the code for the flex box styling.
This is the final project after I changed the font.
My second milestone is coding the Weather, Date, Time, and To-do List. I used javascript to code all three functions. I used an Application Programming Interface to code the Weather, and To-Do list to get the information from a database to display. I first started with the date and time then I followed with the weather. I followed a tutorial at first to build the weather app. After finishing it, I had an idea of where to start with the to-do list because they both used apis to grab information. After I finished all the backend, I used flexbox to create the front end by moving around the objects or changing the font and the size.
This is the code for checking the date and time refreshing based on intervals.
This is the code for looping through an array to display the To-Do list.
This is the code for retrieving the data from the API and using it later in the return statement.
My first milestone is setting up Raspberry Pi. I first started by taking the Raspberry Pi motherboard out of the box and putting the heatsink on it. I then took out the microSD card and downloaded the Raspberry Pi operating system onto it using its imager software and put the microSD card into the motherboard. I also downloaded Secure Shell Protocol (SSH) and Virtual Network Computing (VNC) so I could use the Raspberry Pi machine on my own laptop. Later I downloaded Gitbash and nodejs to run the code on my Raspberry Pi.
This is the initial design of the Smart Mirror that I will create during the three week period.