Review: Exploring Raspberry Pi by Derek Molloy

This book was published in 2016 but I’d always dismissed it because I assumed it would be too basic. After all, I’ve been messing around with the Raspberry Pi for some years now and I really had no use for a book that spends the first couple of chapters saying ‘this is what an LED looks like and here’s how you make it blink’.

Except, this isn’t that book.

I was prompted to take a deeper look after stumbling across one of Derek Molloy’s YouTube videos. It was about setting up a cross-compilation environment for the BeagleBone. I was struck by the way Molloy put across the information. Even though it was very slightly out of date (the video was from 2015) I was able to use it to set up a Linux VM to write C/C++ code for the Raspberry Pi and BeagleBone, automatically upload it to the remote device and debug it there.

That made me look again at Exploring Raspberry Pi – and so I bought it.

The main reason is that, while I love coding in Python, I find myself hankering after C++. I don’t know why; it’s just a quirk. Having set up the cross-compilation environment, I thought this book might provide me with a bit more insight as to how to use it to its full potential. It’s going well so far.

So who is he?

To quote from his website: “Dr Derek Molloy is a senior lecturer in the School of Electronic Engineering, Faculty of Engineering and Computing, Dublin City University, Ireland. He lectures at undergraduate and postgraduate levels in object-oriented programming with embedded systems, digital and analog electronics, and 3D computer graphics. His research contributions are largely in the fields of computer and machine vision, 3D graphics and visualization, and e-Learning.”

This pedigree shows. While the first sections of the book do, indeed, provide introductions to the Pi hardware, Linux and basic electronic components and circuits, the pace is fast and the information dense. It feels like an undergraduate course: you’re expected to take on information quickly. For example, a quarter of the way into the book and we’re already talking about hysteresis having dealt with stuff like systemd.

Luckily, the book is well-written, so while information comes at you thick and fast it’s easily comprehensible. And, of course, you can take it at your own pace. Molloy also supports the book with a number of YouTube videos and downloadable files (the book has a dedicated site).

This approach suits me very well. I don’t feel like I’m wasting my time wading through pages of stuff that I already know or which I’ll never look at again. Like I said, I’ve been messing with the Raspberry Pi for several years and Linux for much longer, but even in the introductory sections I learned useful things. There’s much here that will serve as reference material for a long time to come.

All the things

The scope of the book is extremely comprehensive. Too many books covering this kind of ground give you a basic overview of the platform and a couple of trivial projects and then you’re on your own. You’re given just enough information to get the projects to work.

Yes, Molloy gets you to blink an LED – albeit in more than one language and via a transistor or FET. In fact, while there is a bias towards C++ throughout the book (one of the things I bought it for), Molloy goes to great efforts to ensure you understand the foundations for how everything works and provides alternatives. So, for example, i addition to examples in Bash, Python, C and C++, you’ll find detailed explanations of controlling GPIOs via sysfs, memory-based control and WiringPi.

There are detailed chapters on communications protocols (I2C, SPI and serial), analogue interfacing and hooking up to stuff like sensors, displays and actuators.

As anyone who’s tried it knows, platforms like the Raspberry Pi are not good for real-time control – that’s the domain of microcontrollers. So the chapter on using an Arduino as a real-time slave for the RPi is very useful.

From there, things start getting really advanced: using the Raspberry Pi as an Internet of Things device; wireless communications (Bluetooth, wifi, ZigBee and NFC); getting into GUIs with Qt; image, video and audio processing; and finally kernel processing and creating your own kernel modules.

This is a long book covering a lot of ground and it’s all dealt with in satisfying depth. If you want to cobble together a few cool projects to amaze your friends, there are plenty of books out there for that. But if you really want to understand the Raspberry Pi, Molloy’s your man.

By the way, I bought the Kindle version of the book which I’m reading using the Kindle app on macOS. The text and image formatting of the book work fine (something you can’t always say for heavily illustrated books on the Kindle), although tables do occasionally get split across pages. I can have the book open on one side of my screen (where I can make full use of text highlighting and web links) and my Ubuntu VM on the other.

Never miss a post

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Leave a Reply

Your email address will not be published. Required fields are marked *