Troubleshooting & Errata

The Raspberry Pi ecosystem is continuously changing and evolving, unfortunately this can mean that things which did work during test, may not work forever.  Although I had tried to test and check everything within the book several times, as much as I wanted it to be perfect, it was inevitable with a publication of this size and the limited time I had available that some things would get missed.

My sincere apologies if you discover any errors which cause you additional hassle or inconvenience, I hope that you still enjoy the book.

I’ve compiled a list of corrections which I’ve been made aware of or have discovered since the publication of the book.  While the publisher will ensure that the book is corrected, both in digital format and in subsequent reprints of the book, to avoid confusion I will also list them here so any issues can be avoided (particularly if you have an older copy of the book or have not downloaded a fresh version).

I’ve only included technical errors, or issues which may cause actual problems (any minor, grammatical or spelling mistakes I’m aware of will also be corrected in future updates).

Chapter 7 – P201

The equation for potential divider circuits is incorrect (when I re-drew the equation last minute for the final version I incorrectly included VCC in the denominator), the equation should be as follows (the resulting calculations should still be correct in the section):

Corrected equation for Potential Divider Circuits

Corrected equation for Potential Divider Circuits


Chapter 8 – P236:

Issue: Preview on camera examples are black

Although this isn’t an error as such, this issue appears to occur using the latest camera drivers (which I believe were updated after I developed the code for this section).  Fortunately the fix is fairly straight forward (since everything is so modular), and the issue only affected the preview feature.

If you get black preview images then version of the camera driver you are using may have an issue with generating .gif images correctly. If this occurs you can change the preview image to use .jpg files by altering the PREVIEW_FILE name as follows:

Within change:




The .gif format was used to speed up the preview process.


Chapter 9 – P303:

The same equation diagram which was on Page 201 was also used here (so unfortunately the equation is incorrect here too):

Corrected equation for Potential Divider Circuits

Corrected equation for Potential Divider Circuits



Anything else?

If you spot anything else which you may think is an error or have particular difficulty with something then please do let me know.  I would rather be aware of any issues and be able assist and provide solutions than for people to have problems which become hurdles to getting the most out of the book.


  1. Nigel MacLeod. says:

    I have been trying to run the camera video software, explained in chapter 8.

    The 2nd line of “updateDisp” reads -self.msg(” “)-

    When I run the program, I get a message:-
    AttributError: ‘cameraGUI’ object has no attribute ‘msg’

    I appear to have the code format correct, yet would have expected someone else to find this before now.

    • Firstly many thanks for supporting the book and for reporting the problem. It is very helpful to know if people run into problems so I am able to fix it.

      I’ll retry the code when I get opportunity. However, I can see msg() is part of the cameraGUI() class (as is updateDisp() so self.msg() should be correct.

      I am guessing you may have an issue with indents, all the functions should be equally indented so they all belong to the class (rather than globally to the file).

      Fingers crossed that will fix your issue. Please do let me know if you run into any other problems, always happy to help.

      Tim Cox

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.