I've been playing with some Raspberry Pis before but only with
software.
I have been willing to fiddle with hardware for some time.
This was the perfect opportunity!

LEGO Digital Designer

I decided to try to make my own LEGO Macintosh based on Jannis work.
His blog post is quite detailed with even a list of links with all the
required components.

But I quickly realized there were no LEGO building instructions...
I thus created my own using LEGO Digital Designer, which was fun.
Looking at the pictures on Jannis flickr album
helped a lot. But having an exact idea of the screen size wasn't easy on
the computer. So I also built a small prototype of the front part to get a
better idea. For that I had to wait for my e-paper display.

One modification I wanted to do was to use 1U width lego on the side of
the display to require less drilling.
I also wanted to check if it was possible to use the button located on top
of the display.

E-paper display

I e-mailed them and I was granted to pick up my order at their office!
A big thanks to them!

Raspbery Pi Zero W

The Raspberry Pi Zero W comes with Wifi which is really nice.
It does not come with the soldered GPIO header. I was starting to look at
existing soldering iron when I discovered this GPIO Hammer Header:

No soldering required!
I used the installation jig and it was really easy to install.
There is a nice video that explains how
to proceed:

Connecting the display to the Pi

Based on Jannis article I initially thought it wasn't possible to use a ribbon
cable (due to space), so I ordered some Jumper Wires.
I connected the display to the Pi using the serial expansion
connector as described in his blog post.
It worked. With the demo from embeddedartists, I managed to display a nice cat picture :-)

I then realized that the serial expansion connector didn't give access to
the button on top of the display. That button could allow some
interactions, like changing mode, which would be nice.
According to my prototype with 1U width lego on the side, using a ribbon cable shouldn't actually be
an issue. So I ordered a Downgrade GPIO Ribbon Cable for Raspberry Pi.

It required a little drilling on the right side for the cable to fit. But
not that much. More is needed on the left side to center the screen.
Carried away by my enthusiasm, I actually cut a bit too much on the left side
(using the dremel was fun :-).

Everything fitted nicely in the lego case:

Button on top

With the ribbon cable, the button on top of the display is connected to pin
15 on the Raspberry Pi (BCM GPIO22).
The ImageDemoButton.py part of the demo
shows an example how to use the button to change the image displayed.

Using my small prototype, I planned a small hole on top of the case. I thought I'd have to fill
the brick with something hard to press the button. The 1x1 brick ended fitting perfectly.
As shown on the picture below, the side is exactly on top of the button.
I added a little piece of foam inside the brick to keep it straight.

Pi configuration

Jannis article made me discover resin.io,
which is a really interesting project. I did a few tests on a Raspberry Pi 3 and it was a nice experience.
But when I received my Pi Zero W, it wasn't supported by resinOS yet... This isn't the case anymore!
Version 2.0.3 added support for the wifi chip.

Anyway, as Jannis already wrote about resinOS, I'll describe my tests with Raspbian.
To flash the SD card, I recommend Etcher which is an open source project by the same resin.io.
I'm more a command line guy and I have used dd many times. But I was pleasantly surprised.
It's easy to install and use.

One more thing

There isn't much Python in this article but the Pi is running some
Python code.
I couldn't resist putting a Talk Python To Me
sticker on the back :-)
It's really a great podcast and you should definitevely give it a try if
you haven't yet.
Thanks again to @mkennedy for the stickers!

Next

I didn't build this LEGO Macintosh to use it as a simple clock :-)
I have a few ideas. I'll start with a small web server so that I can receive and display messages.
That will be the subject of another blog post!