I’ve always wanted a backlit logo to hang on the wall in my home office, and more recently, my shed. And to make it slightly more useful, have it flash different colours as notifications. It could show notifications about weather conditions, email, social media, etc … While building this project, I experimented with a few new things, both on the hardware and software side, using a vinyl cutter and resinOS for example.
Here’s how I did it!
Vinyl
My wife is the vinyl cutter specialist at home. I sent her my digital logo and she had the machine cut it on a black vinyl sheet of about 30cm x 30cm. Once cut, all the undesired parts needed to be removed manually using a little hook. After that, a sheet of clear film was taped on top of the vinyl, creating the equivalent of a big sticker. I cut a piece of white acrylic to the same dimensions as the sticker, and we then carefully applied it. It’s comparable to applying a screen protector to your phone, except it’s much, much bigger! 🙂
Frame
Next, I proceeded to work on the frame.
Using the table saw, I made a recess along a 3cm x 3cm wooden beam, which would allow the acrylic to rest on the inside of the frame. Four equal pieces were cut with mitered corners, resulting in a square frame. With the help of some glue and a frame clamp, I had a solid frame a few hours later. The frame was sanded, painted with a primer and then received multiple coats of paint. Some sanding between the coats of paint helped achieving a smoother finish. Once dried, I first inserted a piece of clear acrylic, followed by the white acrylic with logo. The result is similar to a framed picture.
Electronics
The electronics are mounted on the back panel of the frame and consist of the following components:
The Mote Sticks were mounted to the side of the back panel using dabs of hot glue. A large piece of aluminium foil was taped to the center of the panel to help reflect the light a bit more. Though I’m only using two Mote Sticks, which appears to be sufficient in my case, two more could still be added. A small slot at the top of the back panel, ensures the frame can be hung from a nail, a slot at the bottom slides in between the Pi and the Mote pHAT. The pHAT is on the inside of the frame, connected to the Mote Sticks, the Pi is on the outside, connected to power.
To help space things out evenly, assemble the frame and hang it, I designed and 3D printed a few pieces. The different pieces have been uploaded to Thingiverse.
Software
Finally, I tried something different on the software side and gave resin.io a try! I had seen their demo on the Bilge Tank and was curious to see if things were indeed that easy.
I signed up for a free account and went through the detailed Getting Started guide. From there, I created a test application called “HelloResin”, my “Hello World” with resin 🙂 After specifying some details, including networking information, I downloaded the resinOS image and flashed it to an SD card using Etcher. Popped the microSD in my Pi Zero (Pi Zero W’s onboard wifi not yet supported!) with wifi dongle and it automagically came online!
There was still no code to execute, so I wrote some basing myself on the getting started example and posted it to GitHub. Using the Mote Python library, I created a simple social media notification system.
Getting the code on resin was quite straightforward:
1 2 3 4 |
Fredericks-Mac-mini:dev frederickvandenbosch$ git clone https://github.com/fvdbosch/LogoLightBox Fredericks-Mac-mini:dev frederickvandenbosch$ cd LogoLightBox/ Fredericks-Mac-mini:LogoLightBox frederickvandenbosch$ git remote add resin gh_fvdbosch@git.resin.io:gh_fvdbosch/helloresin.git Fredericks-Mac-mini:LogoLightBox frederickvandenbosch$ git push resin master --force |
Within a few minutes, my code was running on the Pi!
The cool thing about this, is that when I build a similar frame for my wife (she already asked for one), all I need to do is flash her Pi with the same software image and the application will automatically be deployed. By updating the environment variables for her Pi, the application wil monitor her social media instead of mine, no coding required. Easy!