Skip to content

10. Output Devices

Tutorials

Group Assignment

  • Measure the power consumption of an output device.
  • Document your work on the group work page and reflect on your individual page what you learned.

Link to my group site.

Individual Assignment

  • Add an output device to a microcontroller board you’ve designed and program it to do something.

My Ouput Plan

For this week, I decided that my ouput device is my magic mirror running. My plan for the finaly project is make the mirror turn on when I walk up to it, therefore the magic mirror is the output device. For this week I decided to set up the magic mirror for next week because setting it up took a long time.

Setting Up Magic Mirror

Beofre I could continue with anything else in this project, I needed to set up the magic mirror. This is because I plan on using the doppler radar to turn on the mirror. But I cant have it do that before setting up the mirror. To set up the Magic Mirro the first thing was to set up the rasberry pi.

Setting Up Rasberry Pi

For this project I will be using a Rasberry Pi 4 Model B. To set it up I followed this tutorial.

The first step was to download the Rasberry Pi Imager. I used that link to download it and downloaded the newest version of it. It took me through a few different steps and I clicked Ok in everyone.

Then I needed to plug the SD card into my computer and flash it using the imager. To do this I chose my divice first which is the Rasberry Pi 4. Then the next step is the Operating System. There is a recommended one based on the device you chouse. I recommend using that if you aren’t sure but mine was the Rasberry Pi OS(64-BIT). Finally the last section was the storage. I was using a SD card therefore, thats the option that I chose.

Once I finished setting up those I clicked next, and and it brought me to the following page. This is where you set up the wifi for your rasberry pi and the username and password to use it. The user name will be used in the terminal. The SSID is the name of the wifi you are using and the pasword it the password of the wifi. It is also important to set up the time zone and the keyboard layout.

After that I clicked save and then it moved on to the writing. This took a very long to do.

Once the writing was done, then I could remove the SD card from the reader, and then added it into my rasberry pi.

Downloading Magic Mirror

The downloading of the Magic Mirror was very simple yet it was alot of sets. I found the download and steps at this website.

Downloading Node

The hardest part was for me to download the Node. To fix this I looked up another way with help from chatGPT.

sudo apt update && sudo apt upgrade -y

This is my first command in order to download. Unfortunetly I wasn’t able to get screenshots of any of this happening because you can’t take screenshots on Rasberry Pi 4.

sudo apt install -y nodejs npm

After the first command was entered in and it was compleated, then I entered in this one

node -v
npm -v

The final command is the following one. Both of those should be entered at the same time just like it is above.

Checking for Git
git

The rest of the steps were the same as what the website says. This is the command to check for the Git. If it is there than is should show the version. If it’s not there, then the website says to install it but I didn’t need to do that.

Clone the Repository
git clone https://github.com/MagicMirrorOrg/MagicMirror

This is the command to clone a git.

Repository
cd MagicMirror

This command navigates the terminal to the ~/MagicMirror directory. Under thisis where the Node is.

Install Application
npm run install-mm

This command will take a very long time, often with little or no terminal response. It’s important to not interrupt the process or there is a risk of a Rasberry Pi jam.

Copy of Config File
cp config/config.js.sample config/config.js
Start the Application
npm run start

This is the command to start the application that you just created. If you are using a Server Only person than the command will be the following below.

npm run server

After all of those steps were finished. My Magic Mirror screen flashed and it looked like the photo below. The turning on was a very long process and I had to re do things many times so when the Magic Mirror came on the screen I was very excited.

This is a picture I took as I was working and what it will look like.

This is a picture of the Magic Mirror working. THe next thing I want to do with it is fix the code to not say “Hi Sexy!” but instead “Hello Elle”. I think that is more appropiate for my project.

Reflection

Individual Assignment

Although I didnt actually connect the magic mirror to a PCB board. I do in the future when I connect it to the doppler sensor that I am using. I enjoyed setting this up because it was good to see progress on my final project.

The next step to this can be found here.

Group Assignment

The group assignment was very easy and straight forward which made me like this week. Now I have learned how to measure the power consumption of an output device.


Last update: May 25, 2025