Exploring Raspberry Pi

Author: Derek Molloy
Publisher: Wiley
Pages:720 
ISBN:  978-1119188681
Print:1119188687
Audience: Intermediate to advanced IoT programmers
Rating: 4.8
Reviewer: Mike James

Interfacing to the Real World with Embedded Linux sounds like it could be fun.

This is  a really good book and at 720 pages there must be something in it that makes it worth buying no matter how expert you are using the Pi. On the other hand it is 720 pages of everything including the kitchen sink. It attempts to cover everything and perhaps as a result doesn't do any of the topics it covers the justice they deserve. The main impact of this is that it isn't suitable for the beginner. You need to have a good grasp of programming, and to a lesser extent electronics, to get anything much from it. However, if you are at the right level then this book is packed with information that you can expand on and add the details that are left out. 

Having said this, it starts at a bit too low a level. Part I is titled Raspberry Pi Basics and it really should be a separate introductory book.  Chapter 1 tells you what a Pi is and who should use it. If you don't know already then you are reading the wrong book. Then on to Linux, which really is just an ordinary Linux and not particularly "embedded" as the subtitle of the book suggests. We have a lot of very standard information that you can find anywhere presented in Chapter 2. Is it really necessary to tell the reader how to make an SD card to boot Raspbian, how to connect to a network, and so on? Surely it would be better to assume that the reader already knew the basics of getting the Pi up and running? 

Chapter 3 is where the book starts to get into its more specialized subject matter with a look at how to use Linux as an "embedded" operating system. Even here we have a lot of very standard features explained such as "is Linux open source and free?", the super user and Linux commands. We also have some stranger things like using Git. 

By Chapter 4 you have to think that you are reading a book that isn't really going to get to its main topic because this is an introduction to electronics. How a multimeter works, voltage, current, oscilloscopes and so on. Then on into diodes, LEDs and more. Yes, you do need to know all this, but if you don't already know it then this chapter isn't going to do anything other than make you aware of what you don't know. If you have done some electronics and forgotten it then it might help you remember.

Chapter 5 explains how to program the Pi and it covers a wide range of possibilities - Bash, Lua, Perl, Python, Node, C, C++ and so on. No clear winner and at the end if your aim is to do some interfacing you are going to be wondering what the best choice is. 

 

reaspberrypiexplore

 

Part II: Interfacing, Controlling and Communicating  is where the value of the book starts to become apparent. However, there is still the small problem that everything is included - coverage is exhaustive, but also exhausting. Chapter 6 looks at GPIO via SYSFS, direct memory access, WiringPi and so on. Chapter 7 is about using Eclipse and building the Kernel. Using Eclipse is a no-brainer, but there is a lot to be said for using NetBeans which is more stable and easier to use. Building the Linux Kernel is way too advanced for Chapter 7 and it gives the impression that if you want to develop control software you probably need to compile the Kernel - you most likely don't.

Chapter 8 deals with using the standard buses I2C, SPI and UART. Chapter 9 pushes this further and expands the Pi with a menagerie of external modules and components - AtoD , DtoA, PWM, more GPIO lines and so on. Chapter 10 does a similar thing for output - DC motors, steppers, displays and so on. The final chapter in the section focuses on real time interfacing. For this we bring in an Arduino communicating over a serial link and I2C - not at all sure why as the Pi can do most of the work itself and it takes quite a demanding application for there to be any need to bring in an Arduino. 

Part III is on Advanced Interfacing and Interaction but if compiling the Kernel in Chapter 7 wasn't advanced I'm not sure what should count. Chapter 12 deals with the IoT and the many different backends designed to collect and process data from small devices. This goes over how to get on the web using Nginx and raw C/C++. It covers ThingSpeak, IFTTT and IBM's MQTT. It doesn't mention Cayenne, which is an easy way to build sensors and manage their data and more or less makes the chapter redundant. 

Chapter 13 goes into Bluetooth, WiFi and ZigBee, Chapter 14 is about building a UI using Qt and Chapter 15 is about using the image, video and audio facilities. 

The book closes with an explanation of how to write Linux Kernel modules. This is difficult mainly because no one has taken the time and trouble to make the development environment easy to use. It is a fun topic and writing Kernel modules is a useful skill, but not one you are going to use very often as most of what you want to do with a Pi can be done without a custom module. 

There are a couple of small things that stop this from being a really exceptional book. The first is that it tends to present everything possible and leave you to decide what to use. It also has a tendency to throw things in where you might not expect them and trying to find information you are sure you saw in there somewhere is going to be a common problem, even with a comprehensive index. The second problem is that rather than explaining how to go about solving a problem - interfacing some new device say - it falls back on showing you how to do things. This isn't a bad thing, and might make the book more valuable if it includes a device you want to use, but it might be better to explain the thinking behind the solutions a little more. 

The main problem is that there are at least three books in here vying with each other for attention. The first is a lowish level introduction to the Pi and Linux. The second is about interfacing and electronics and the third is about advanced Linux Kernel programming. 

For all my complaining - this is a book worth having on your shelf. If you are an IoT programmer, or want to be, just buy it because there will be something in its 720 pages that saves you effort. 

 

Find related book reviews in our Hardware/IoT section

See Harry Fairhead's work-in-progress Raspberry Pi IoT ic C for an alternative approach to interfacing the Raspberry Pi to the real world.

To keep up with our coverage of books for programmers, follow @bookwatchiprog on Twitter or subscribe to I Programmer's Books RSS feed for each day's new addition to Book Watch and for new reviews.

 

 

Last Updated ( Tuesday, 16 August 2016 )