Book Review: MicroPython Projects

MicroPython Projects is a book for embedded software developers who are interested in branching out and learning how to build systems using Python. The book starts with an exploration of why a developer may want to forgo using C/C++ and instead venture into using MicroPython. The book in general is a project based book that demonstrates how to build different applications.

Author: Jacob Beningo

Published: 2020

Target Audience: Embedded Software Developers interested in MicroPython

Jacob’s Rating: Not Rated (I’m the author so rating my own book would either result in too high a rating or too low for being over critical).

Book Link: MicroPython Projects (On Amazon)

MicroPython Projects is a book for developers who are interested in exploring alternative programming languages for building embedded systems. C/C++ have dominated the industry for decades but as hardware has evolved along with system features and development techniques, other languages are starting to become options for building embedded systems.

MicroPython Projects is mostly a hands-on book that presents the reader with eight projects designed to help developers understand application design using MicroPython. The book starts out with an exploration of Python and programming languages in general and makes the case where when and where it makes sense to use MicroPython. Each subsequent chapter follows a mini design cycle that looks at the project requirements, architecture, implementation and then how to test it.

Chapter 2 is the most foundational chapter in the book. It explains to the reader how to schedule tasks. The reader is provided with several different methods that include using interrupts (not a great idea), round robin, threads and the uasynchio library (great idea). These techniques are required for any MicroPython based system.

The book moves on to cover fundamental topics such as driven design for external integrated circuits (Chapter 3) and how to build a custom test harness that is a hardware in loop tester (Chpater 4). Personally, my favorite chapter is Chapter 5 which dives into the MicroPython kernel. If you build a product with MicroPython, chances are you will need to customize the kernel to include your own code and to customize the boot sequence to ensure robust behavior. This chapter goes into those details and even has the reader build and deploy their own custom kernel on a STM32L4 IoT Discovery Node. 

Debugging is always a critical topic which is partially covered in Chapter 6. This chapter shows the reader how to build a visualizer that can be used to send data to a host computer to graph sensor data or even debug messages. This is an important skill for the later projects that are more advanced like the gesture controller (Chapter 7).

Chapter 8 shows a developer how to deploy MicroPython on an ESP32 and how to set it up as an access point. An Android device is then used to create an automation and control interface using a socket server. The example provides the building blocks a developer would need to create an internet connected device. The last project demonstrates how to leverage the OpenMV camera module for object detection using machine learning (Chapter 9). This was a fun chapter to write and will be the basis for a DesignNews CEC course I will be doing in June.

This book was a lot of fun to write and at times quite challenging given my normal day-to-day responsibilities with clients  and my typical writing workload. My hope is that those who read it find some insights and learn about what it is like to build something that uses MicroPython. Overall it took about 16 months to write but every minute of it was interesting.

If you have an interest in reading MicroPython Projects, you can use this link to get a discount of 20% until May 9th, 2020. (After that, pick your favorite book retailer!)

 

Share >

2 thoughts on “Book Review: MicroPython Projects

  1. Hi Jacob,

    I just recently picked up your MicroPython book and am enjoying going through it. I am having an issue finding a Pyboard in stock even at MycroPython store. Is it possible to get through the exercises using another board such as Raspberry Pi Pico, a Aurdio Nicla Sense or even the STM32L4 IoT Discovery kit?

    Thanks

    • Thanks for the question.

      You can definitely use different hardware. You may need to make some small changes to the source code for different pin-outs, but you should be able to still use a lot that is there.

Leave a Reply

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

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