The Texting Mirror (Project 3, 2017)

Pavel Sokolovsky
4 min readAug 23, 2017

--

Below is the story of a project that fell short of expectations. Though the technology worked during testing, it failed after final assembly. I spent a little time trying to debug, but eventually stopped for a few reasons:

  1. I lost excitement for the project due to an extended, slow-moving timeline.
  2. Between start and finish, Amazon released a product that’s like mine but way better.
  3. I had already replaced a hardware component once due to suspected physical damage. I suspect there may be more now.

I’m okay with this outcome, since I had fun working on the project and it taught me some valuable lessons!

The Setup

Time travel with me back to February 2017. I was trying to think of a project for Q2. My wife came up with an idea that we thought had merit…

What if your mirror could take a picture of you and send it to you as a text?

You could have full-length photos of different outfits without the annoying phone in the selfie.

You could also use it to take pictures of the back of your outfit.

Brilliant! Keep in mind that Amazon had yet to announce their Echo Show.

So, I decided to collaborate with my cousin Dennis to turn this concept into reality. He’s been honing his woodworking skills for the past year, so we figured this would be an interesting project for both of us.

The idea we settled on was a button-activated camera with a 5-second delay. The camera would be built into the frame of the mirror.

The Electronics

The equipment consisted of a Raspberry Pi, a PiCamera, and a hardware button. Below you can see what it looks like assembled with a rapid prototyping breadboard.

the prototype

The Software

Once I had the physical parts all connected, the next step was to figure out how to save the pictures from the camera. I decided to upload them to an Amazon S3 bucket so that I’d be able to store them without worrying about file size limits on the Raspberry Pi memory card.

First I needed to figure out how to upload a file to S3 via Python (which is the most logical choice of language for the PiCamera interface).

first test upload to s3

I managed to get that working, and then I tied in the camera’s output to upload an actual photo to S3 in real-time based on pressing the physical button.

First button press image to s3

Now that I can upload a photo to S3, my next step is to be able to send it to my phone as a MMS message. I decided to use Twilio’s API to accomplish this.

With my fancy new Twilio phone number, I managed to complete the proof of concept and send my photo to my phone as a text message!

first image sent by text message

The Mirror

I handed the prototype to Dennis for him to incorporate into a mirror. Here’s where we made a mistake: we didn’t coordinate closely enough. While he did a beautiful job crafting the wood, the camera didn’t end up in an ideal position, and the components were hard to reach.

The electronics in place

I connected all of the wiring, skipping the breadboard in favor of direct connections. [Note: Hobbyist wiring is fairly hard to find in Chicago now that Radio Shack is gone. Two thumbs up to Micro Center for having the goods!]

The electronics covered up with a nice gold cover

Before I installed it in my bedroom, but after I had everything closed up and tested, the mirror was working. I’m recording a video demonstrating it on my phone. The photo below was taken by the mirror during the video:

One of the last photos the Texting Mirror ever took

The Final Product, Hung

After hanging it, an obscure software error stopped the camera from loading properly. I think this was actually rooted in hardware.

Still, this project was a lot of fun and I learned a lot (including Python!). Sadly, this final picture comes from my phone rather than my mirror.

The Texting Mirror

--

--