I’ve been asked several times about why am I promoting Docker for embedded systems.

Well, this project is an answer to that question – building an MQTT controlled RGB LED matrix panel from scratch in under 30 minutes and probably a whole lot less. I’ll also be soon running a video series called DockerFu, which will be similar to my LinuxFu series – getting you from knowing nothing, to knowing everything about Docker.

Back in MickMakeMail #27 you would have seen me un-box two RGB LED matrix panels. The goal was to be able very quickly setup the panels to display arbitrary messages using MQTT. This would allow me to tie it in to services such as IFTTT, but it wasn’t enough to just write some code. I wanted to be able to make it very easy for anyone to run the software without having all that messy installation process.

Download Raspbian

Once you have all your bits, download the latest Raspbian image from the Raspberry Pi website.

Soldering the Pi hat

While that is happening, you’ll need to make a choice between having a slow panel with audio, or a fast panel without audio. The slower panels can be a little flickery sometimes.

So, if you’re happy without any audio, then you can make this small change on the matrix hat, which is connecting up GPIO 4 to GPIO 18.

Burning the SD

By now your download should have finished. Fire up the SD burner of your choice and burn that to an SD card.

While that’s happening … you can solder up a header to the Pi Zero W. Of course this header is already provided on most Pis.

Connecting up the panel

Next you’ll need to connect up the matrix hat to the provided cable and then to the panel.Next connect the power cable to the paneland then the other end to the screw terminals of the Pi hat.Make sure you have the correct orientation, with the red and black cables in this position.

SD card changes

Now that your SD card has finished burning, you’ll need to make some changes so that it’ll connect to your WiFi Access Point.

First edit the config.txt file and add this line at the end. Also make sure that you disable audio.

dtparam=audio=off
dtoverlay=dwc2

Next edit the wpa supplicant file and add your WiFi Access Point details.

Enable root logins

Now the next step is optional, which is to allow root logins. It’s just something that I do on all Pis.

Edit the /etc/ssh/sshd_config file and change the PermitRootLogin line to yes and then save.Change the root password to something that will annoy you in future and restart SSH.

/etc/init.d/ssh restart

Then you can login to your Pi directly as root.

Installing Docker

Next on to installing Docker. This is very trivial and all it requires is running this commandwhich will take around 4 minutes to complete.

If you use the pi user account often then don’t forget to give access to Docker for that user account.

usermod -aG docker pi

Then reboot. You don’t really need to reboot, but I often do so just to make sure there’s no issues when booting.

Now on to the good bit. I’ve created a Docker image that you can download that has my snazzy MQTT panel driver as well as all the C and Python libraries supporting it. So you can use my app, or write your own.The source code is also up on GitHub along with handy shell scripts for creating, starting and stopping this container.

You can pull this container by running this command.

docker pull mickmake/project-mqttpanel:latest

Once it’s finished downloading and extracting, you’ll need to create a container from the image by running this command.

This will start up the container and execute my pre-loaded app. The default display will be an animated GIF of a creepy alien guy in the background along with the date and time. This is completely configurable via MQTT publish commands.

Runtime

If you have any MQTT clients installed on your PC, you’ll be able to send MQTT messages to the panel. For example you can change the background image to an animated heart beat.

Or a pair of animated handsReally any GIF or JPG file will display as the background. These are stored within the Docker container and you can change them to anything you want.

You can also send MQTT messages on the Pi itself. To make it easier for yourself create a script. This will run the Mosquitto client within a Docker container.Or you can use the scripts from the GitHub page.

Then you can issue the same commands. For example; Display ‘congrats’ in blue text with clapping hands as the background.

Heat and speed

The Pi Zero can keep up with the display without issue, although for larger animated GIFs, you may want to use a Pi2 or Pi3.

As you can see, my MQTTpanel executable and Mosquitto server consume almost 70% of the CPU.

If you find things a bit laggy, you can always stop and disable the LightDM service, as desktop logins won’t ever be needed.

systemctl stop lightdm.service
systemctl disable lightdm.service

Also, the Pi will get quite hot. The peak temperature is around 50C with an ambient 30C room temperature. When you build an enclosure for this, make sure that there is adequate ventilation.

Speaking of enclosures… You can do away with the long cable if you buy a female to female header and mount the Pi hat directly to the panel. This is something that I’ll definitely be doing.

Pretty easy stuff.

Summary

So, hopefully you’ll see how Docker simplifies software installation which is just as important on embedded systems as it is on large data-centers. One of the issues that plagues the SBC Maker scene is software configuration and dependencies.

Docker solves that and gets you up and running quickly.

Hope you enjoyed this quick video. If you’d like to see more of them, then consider supporting me on Patreon or directly. My current Patrons, along with sponsorships, have been a great help to me.

I’ve always tried to produce high quality videos packed full of content that are easily digestible, but I’d really like to be able to take it to the next level. So, with your help, I’ll be able to reach that goal.

How do you think which one is the best way to use what if I would like to make something to communicate with music, images, data, etc?

I knew that it is very complicated. So I will give some examples.

Option1. I would like to send some images, text with smart phone application in a room about 1,000 square feet. or Option2. I would like to send images, text with my computer to RGB LED PANEL based on your MQTT project.

Please, give me your advice. Thank you in advance! Hopefully, help me to build this great project.

Hi Clara, In that case I would use a Pi Zero. I’m gathering that you have someone up the back who manages the lyrics for the congregation? They could also control the LED panel and update the song title.

It has been a long journey to me. But today, I have seen a light of my life. Because, I could see red light in my LED RGB PANEL! Though it was kept on lighting only for 10 seconds and then it disappeared.

I chose Raspberry pie 3 instead of zero.

Now I am checking what is the problem.

Most of all, I think that I have finished my first Raspberry coding successfully until now. I installed programs from Rasbian to vim by myself and followed up your whole manual one by one. Sometimes, I made some mistakes back and forth. But finally, I did it. And also, I did my best to solder to make it perfect.

I came across this project while trying to hack together exactly the same thing in Python. I use Home Assistant and wanted a way to use MQTT to to display messages around the house.

After playing with this for about 30 seconds I abandoned my plans to make my own because this is a fantastic project. Thank you very much for making it. The gifs are an added bonus that I hadn’t thought of!

I wanted to ask if you’re accepting bugs. I’m not a C person so I don’t want to start hacking around in your code!

Hello, I’m very interested in this project and I have ordered all the needed parts to do it. In case of using an Adafruit bonnet, I’ve seen that for 64x64 matrix panels you need to connect in the lower side of the bonnet a couple of points (8 or 16) with a solder blob, but I have not seen this on your instructions. Could you please confirm if this is needed or not?

This first Weeky Roundup of the year and we're already seeing lots of new goodies from SBCs, to WiFi modules, but really a tonne of new SBCs. Continue reading Weekly Roundup #62: New Maker Products // News→

This week's Weekly Roundup, which hasn't really been weekly for the past month, we're seeing a fair amount of retro kit, FPGAs and SBCs. Basically a whole lot of stuff that is really cool that you didn't know you needed. Continue reading Weekly Roundup #61: New Maker Products // News→

This week's Weekly Roundup is actually a little short, but we have FPGAs, SBCs and other cool things I've found in my travels on the interwebs. Continue reading Weekly Roundup #60: New Maker Products // News→

An SBC that's not really an SBC. Based on the NationalChip GX6605S, it runs a tiny Linux with a very small component count, but is it too cool to be usable? Continue reading The C-Sky SBC: Pi in the Sky? // Review→

In this review I take a look at one of the newer members of the Khadas family; The Khadas Edge and Khadas Captain. This board has some pretty interesting power management but, unfortunately, I saw the return of the magic smoke genie. Continue reading The Khadas Edge: A new captain

The LattePanda Alpha SBC is a bit of a beast not only in horse power, but in price. In this video I look at benchmarks on Windows, Linux and OSX and give my perspective on why LattePanda made a big mistake. Continue reading LattePanda Alpha: The big mistake? // Review→

This quick project shows you how to build an MQTT controlled RGB LED matrix panel in under 30 minutes, but I reckon it should take you a lot less. Continue reading Build an MQTT based RGB LED panel! // Project→

Do you want to be able to send an SMS over 20kms without using a mobile phone network? Here's one small project you can knock up in less than a day allowing you to send an SMS over LoRa. Continue reading SMS over LoRa: Long distance SMS without 4G //

If you're a fan of GoLang then your options are limited in the embedded world. So, here's a couple of options for you with a working bare metal example for an STM32 MCU written entirely in Go. Continue reading Running GoLang on an STM32 MCU. A quick tutorial.→

This is the second part of my video on building a simple PCB using EasyEDA. This time we'll be taking a look at how to use a solder stencil, placing SMD components, soldering using kitchen equipment and how to fix up your mistakes. Continue reading Make a PCB from scratch

A follow-up to my video tutorial: "Program an Atmel SAM without an IDE". I've created a Docker container on GitHub with a complete ASF build chain. Ready to go. Go for it! Continue reading Atmel Software Framework and build chain in a Docker container→

A bit of a different mailbag this week. Containing a lot of bits and pieces for upcoming projects and other odds and ends. Continue reading MickMake Mail #30: Gakken, JLCPCB, wicking and skulls // News→