I built a mini LEGO Macintosh Classic with e‑ink display

Share this story

Long story short: I built a Wi-Fi enabled LEGO Macintosh Classic running Docker on a Raspberry Pi Zero with an e‑paper display. Docker deployments via resin.io. Read on for more details of how I built it.

But why?

While my son and I were playing with LEGO, after building a 1987 GMC Vandura and an off-road Segway I suddenly had the urge to build one of the first computers I remember using:

I am not a 100% sure if it was this exact model or perhaps even the Macintosh 128K from 1988, but I guess it doesn't really matter. All I did with that computer was play Shufflepuck Café. If you, too, are one of the elderly, be warned that the following video and audio will give you the feels:

But anyways, this post isn't about Shufflepuck nostalgia, it's about taking things too far while playing with LEGO with your kid.

Fitting prototype

I went ahead and ordered a 2.7-inch e-paper display from Embedded Artists. It arrived after a couple of days and I immediately started building a little fitting prototype in LEGO to see what dimensions the Macintosh would have in order to fit that display. Let me tell you one thing... it didn't look good:

But it looked so good in my mind! Well, the coloured bricks don't help—they should be in a uniform grey. So I looked for an alternative way to prototype LEGO and found...

Lego Digital Designer

You can download LEGO Digital Designer (LDD for short) for free from ldd.lego.com. It's a very basic 3D LEGO editor that does the job. So I took the measurements from the catastrophe that is the coloured prototype above and rebuilt it in LDD:

It looks slightly better in grey, but one thing became apparent: with a screen this small, the border left and right of the screen can't be 3 LEGO blocks wide. That's just too much compared to the size of the display. The problem is: the display's board is quite a bit bigger than the display itself:

The overlap on the right side of the display is quite small, but on the left side more than 10mm of board needs to be hidden inside the case of the LEGO Macintosh. I could only think of one solution: Get a Dremel and cut into the LEGO to make it fit with a border of only 2 bricks. Should be simple enough.

So I fired up LDD again and made a couple of variations of different sizes, but all with a display frame of exactly two bricks:

Ordering the bricks

Unfortunately, you can't order pieces right out of LDD. But it lets you print a list of pieces which, I thought, is good enough. When trying to order them one by one I realised that not all bricks that you can use in the LDD are actually available in all colours online. Since this project was a birthday gift for a buddy of mine, I didn't have the time to do more research and ordered the blocks in white right off lego.com.

Shipping took around a week. Here's the exact parts needed for two Macintoshs (yes, knolling, I know, but you can't have kids and knoll—it's one or the other):

Note how on the left side there's almost no plastic left. Putting the rest together was straight forward. Now all I had to do was connect the e-paper display to the Raspberry Pi Zero and off weeeeee go!

E-ink display on the Raspberry Pi Zero

Further Reading

For a hardware dilettante extraordinaire like me, connecting the e-paper display to the Raspberry Pi Zero was a little tricky. The reason was space. Normally, you can just connect the display to your Raspberry Pi with the ribbon cable. That doesn't work in this case (see what I did there?), though, so I had to figure out which pin of their 14 pin serial expansion connector goes to which GPIO pin of the Raspberry Pi.

The following diagram is from a schematic supplied by Embedded Artists:

I am guessing that only the VCC/GND and SPI pins need to be connected, but I don't know for sure—I connected all of them. If one of you knows enough to validate this, perhaps we should submit it to the fantastic pinout.xyz!

Here's a photo from the first time I managed to make the display display something:

Wi-Fi soldered onto the Raspberry Pi Zero

If you closely look at the photo above, you see a little erect thing connected to the Raspberry Pi Zero in the background. That little thing is the inside of the Raspberry Pi Wi-Fi USB dongle. Of course, right after I purchased the Zero, a version with Wi-Fi onboard was released: the Raspberry Pi Zero W. Anyways, I followed this beautiful tutorial.

Unless you want to solder, I would recommend just buying the Raspberry Pi Zero W. It takes up less room and comes with Bluetooth, too!

Docker & resin.io

Remember I said this little project is a trojan horse birthday present? That's right! It's going to be deployed in the field, at my friend's place, far away from me without the possibility of physical access. So how would I go about updating the code that puts useful information on the little Mac's screen?

While playing with Docker on the Raspberry Pi, I came across the great ARM docker base images from the folks over at resin.io. After checking out their service I realised they do just what I was looking for: they're like a Docker Cloud for the IoT.

All I have to do now is a git push to a resin.io repo—they'll build the Docker image for me and deploy it on the Pi. Setting it up was ridiculously easy:

Sign up at resin.io

Download an .img that comes preconfigured with my Wi-Fi credentials

Burn it to the SD card with their open source app Etcher (I love how we still say burning)

Put the SD card into the Raspberry Pi

Done 🤠

If you have a Raspberry Pi and the e-paper display by Embedded Artists, you can use my docker base image. Just put this in your Dockerfile:FROM jannis/epaper-docker

And then git push resin master and you'll deploy your code to your devices like this:

I can only encourage you to use docker for your Pi projects, as there's nothing as fine as having all the configuration and setup done and preserved forever in a docker image. Instead of having to read all the READMEs of the LEDs, displays, and sensors you're using all over again if you want to setup a new Raspberry Pi what do you do? You docker pull.