Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
MicroPython Projects
MicroPython Projects

MicroPython Projects: A do-it-yourself guide for embedded developers to build a range of applications using Python

Arrow left icon
Profile Icon Jacob Beningo
Arrow right icon
S$34.29 S$48.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.4 (10 Ratings)
eBook Apr 2020 294 pages 1st Edition
eBook
S$34.29 S$48.99
Paperback
S$60.99
Subscription
Free Trial
Arrow left icon
Profile Icon Jacob Beningo
Arrow right icon
S$34.29 S$48.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.4 (10 Ratings)
eBook Apr 2020 294 pages 1st Edition
eBook
S$34.29 S$48.99
Paperback
S$60.99
Subscription
Free Trial
eBook
S$34.29 S$48.99
Paperback
S$60.99
Subscription
Free Trial

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

MicroPython Projects

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Delve into MicroPython Kernel and learn to make modifications that will enhance your embedded applications
  • Design and implement drivers to interact with a variety of sensors and devices
  • Build low-cost projects such as DIY automation and object detection with machine learning

Description

With the increasing complexity of embedded systems seen over the past few years, developers are looking for ways to manage them easily by solving problems without spending a lot of time on finding supported peripherals. MicroPython is an efficient and lean implementation of the Python 3 programming language, which is optimized to run on microcontrollers. MicroPython Projects will guide you in building and managing your embedded systems with ease. This book is a comprehensive project-based guide that will help you build a wide range of projects and give you the confidence to design complex projects spanning new areas of technology such as electronic applications, automation devices, and IoT applications. While building seven engaging projects, you'll learn how to enable devices to communicate with each other, access and control devices over a TCP/IP socket, and store and retrieve data. The complexity will increase progressively as you work on different projects, covering areas such as driver design, sensor interfacing, and MicroPython kernel customization. By the end of this MicroPython book, you'll be able to develop industry-standard embedded systems and keep up with the evolution of the Internet of Things.

Who is this book for?

If you are an embedded developer or hobbyist looking to build interesting projects using MicroPython, this book is for you. A basic understanding of electronics and Python is required while some MicroPython experience will be helpful.

What you will learn

  • Develop embedded systems using MicroPython
  • Build a custom debugging tool to visualize sensor data in real-time
  • Detect objects using machine learning and MicroPython
  • Discover how to minimize project costs and reduce development time
  • Get to grips with gesture operations and parsing gesture data
  • Learn how to customize and deploy the MicroPython kernel
  • Explore the techniques for scheduling application tasks and activities

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Apr 17, 2020
Length: 294 pages
Edition : 1st
Language : English
ISBN-13 : 9781789952537
Category :
Languages :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Apr 17, 2020
Length: 294 pages
Edition : 1st
Language : English
ISBN-13 : 9781789952537
Category :
Languages :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just S$6 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just S$6 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total S$ 199.97
Practical Python Programming for IoT
S$70.99
MicroPython Projects
S$60.99
MicroPython Cookbook
S$67.99
Total S$ 199.97 Stars icon

Table of Contents

13 Chapters
Down the Rabbit Hole with MicroPython Chevron down icon Chevron up icon
Managing Real-Time Tasks Chevron down icon Chevron up icon
Writing a MicroPython Driver for an I/O Expander Chevron down icon Chevron up icon
Developing an Application Test Harness Chevron down icon Chevron up icon
Customizing the MicroPython Kernel Start Up Code Chevron down icon Chevron up icon
A Custom Debugging Tool to Visualize Sensor Data Chevron down icon Chevron up icon
Device Control Using Gestures Chevron down icon Chevron up icon
Automation and Control Using Android Chevron down icon Chevron up icon
Building an Object Detection Application Using Machine Learning Chevron down icon Chevron up icon
The Future of MicroPython Chevron down icon Chevron up icon
Downloading and Running MicroPython Code Chevron down icon Chevron up icon
Assessments Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.4
(10 Ratings)
5 star 70%
4 star 20%
3 star 0%
2 star 0%
1 star 10%
Filter icon Filter
Top Reviews

Filter reviews by




Subramaniam Ganesan May 21, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
OverviewThis book is for anyone interested in learning Micropython and doing projects with Arduino and similar microprocessor boards.What I likedThis book is very clearly written with a lot of example codes, steps to download Micropython, the board and Camera information. I liked the Chapter 2 on real time scheduling, and description of the “asyncio” module for connecting input and output. As a computer engineer with many decades of experience, I really enjoyed reading the whole book without keeping it down. I learnt new techniques and the new language Micropython.What I didn’t likeChapter 9 describes well the STM32 board and the OpenMV camera, Machine Learning program to detect objects. This chapter may give more examples and more description of the codes. A fresh engineer may find some parts difficult to understand. Chapter 10 describes the future of Micropython and I wish to see more depth in this topic. More description at the student level will be good in the later chapters.SummaryIt is an excellent book. Embedded System engineers will certainly find this book interesting and good for learning new techniques. I recommend this book for EE, CE, CS students and working engineers.
Amazon Verified review Amazon
jerzy wilder Feb 22, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Thanks
Amazon Verified review Amazon
Brad Stewart May 26, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is one of the most interesting books I've discovered for MicroPython. It's clearly written, the examples are comprehensive, and most important of all—I gained new insights and knowledge. The author has created a series of very useful projects and a design methodology that I am adopting for my own needs. The chapter on managing real-time tasks alone is worth the admission price.I'm an electrical engineer and I've been programming embedded systems for about 40 years. I've used many different languages, debuggers, middleware, and IDEs. A couple of years ago, I discovered MicroPython that runs on a STM32F405 MCU. Since then, I've developed several products from automotive to industrial applications that utilize the MicroPython environment. And unless I really need to program in C, I'm sticking with MicroPython. It's that good.One thing I must mention first. This is not a book for beginners. It helps if you have some Python experience, but you should really have some hands-on experience with MicroPython. There are excellent sources on the web and other books such as Programming with MicroPython: Embedded Programming with Microcontrollers and Python by Nicholas Tollervey. But when you're ready to take the next step, then MicroPython Projects should be on your list of must reads.The first chapter makes the case for MicroPython. Although the author makes it clear of the advantages of using MicroPython, I would go even further and make the bold statement that MicroPython will become the dominant embedded programming language in the foreseeable future. My main justification is that Python is the world most popular computer language. Even embedded projects that utilize the Raspberry Pi use Python. Furthermore, those knowledgeable in embedded C are becoming a scarce resource, especially in the U.S.The second chapter is my favorite. It's about managing real time tasks. Yes, it's possible with MicroPython which makes it different from regular Python. The author explains standard methods familiar with RTOS programmers. This includes round-robin scheduling, periodic scheduling using timers, event-driven scheduling, cooperative scheduling, and even using the nascent (and too early to use) MicroPython thread mechanism. Of these, the “asyncio” library has the ability to do cooperative multitasking,and a simple example is provided. Brilliant. My only comment is that not all versions of MicroPython (e.g. CircuitPython) can use these techniques and perhaps this could have been pointed out.The third chapter goes into details on hooking up some hardware to a PyBoard and writing the drivers to support it. The author details the design methodology including flow diagrams, building a series of “test cases,” and creating class objects to drive the hardware. My only comment is that one of the libraries was written as a class object, where as the second example is not. However, a glance at the git repository where the example code is available shows everything tied together as class libraries and invoked with a “main.py” module.The fourth chapter introduces the concept of “test harnesses.” These are used to test the MicroPython modules and application code. A simple example is used to convey the general idea.The fifth chapter is also very useful. It explains how you can customize the MicroPython kernel. This is important if you need to port to another MCU or if you want to develop custom libraries that can be included in the kernel. I've had to do this in the past to overcome some MCU peripheral limitations and functionality, as well as “freezing” libraries into the kernel as I started to run out of SRAM. Although the procedures for doing the modifications can be found on the internet, this is the first time I've seen it clearly presented in a book form.Chapter Six discusses ways to visualize data which is very useful during code development such as plotting data from a sensor in real-time (or near real-time) on your PC. In a typical C development, this is a bit of a challenge. The REPL prompt of MicroPython (and PC Python) is a very powerful feature which can be leveraged to send data to a PC over USB and displaying the data graphically using the Python mathplotlib (or Tkinter) libraries.To round out the rest of the book, Chapter Seven goes through a gesture recognizer that uses IR emitters and detectors, Chapter Eight explains how to use Android and the web to communicate with a ESP32 MicroPython board, Chapter Nine has examples for machine learning, and Chapter Ten provides a glimpse into the near future of MicroPython.So what's not to like about MicroPython Projects? I found the mix of examples using class objects and regular code to cause some temporary confusion. But my main complaint is the quality of some of the pictures and diagrams. For $40, I would expect higher print quality. But that is really the fault of the publisher.Although this book has a lot of useful information, more is needed. By it's nature, MicroPython can be slow and memory hungry. But it doesn't have to be as there are many ways to speed it up and optimize memory. Perhaps this can be covered in a second volume.All in all, an excellent read and I highly recommend it.
Amazon Verified review Amazon
Clive (Max) Maxfield May 18, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Let’s commence with the full disclosure “weasel words” (remember that eagles may soar, but weasels rarely get sucked into jet engines). First, I’m a friend of the author; second, the publisher gave me a free copy of the book to peruse, ponder, and review.OK, so I’ll start by saying that this book is not for everyone. It’s intended for a specific audience and for that audience it’s a fantastic book, but it’s not intended for beginners.The high-level blurb for the book says: “A basic understanding of electronics and Python is required while some MicroPython experience will be helpful.” When you start reading the book, it becomes a little more specific by saying: “This book assumes that the reader has a basic understanding of Python and that they have at least built a few embedded systems projects previously.”I think the key point here is the fact that the book is targeting readers who have already created a couple of embedded systems, so they understand concepts like hardware abstraction layers (HALs) and they are familiar with using GitHub and suchlike.I’m a hardware design engineer by trade. I can read and write software (predominantly C with a hint of a sniff of Python), but you wouldn’t want to use my hobbyist-level code for anything serious. Also, I’ve found it difficult in the past to meander my way around GitHub and download and install libraries and make sense of other peoples’ implementations, which is something professional embedded systems developers appear to have no problems with at all.So, assuming that you already have a clue what you are doing with regard to microcontroller development boards and embedded systems, and aren’t afraid when you hear the term “Python,” then this book provides an awesome introduction to MicroPython, which is an efficient and lean implementation of the Python 3 programming language optimized to run on microcontrollers.The book starts by setting the scene -- talking about the advantages and disadvantages of languages like C/C++ and Python and MicroPython. Next, we look at different ways to manage real-time tasks in MicroPython, using blinking a couple of unicolor LEDs as examples. This leads us into creating a simple application to read a pushbutton and use it to cycle through a series of colors on a tricolor (RGB) LED.From here, the author keeps building things up layer-by-layer, developing an application test harness, customizing the MicroPython Kernel start-up-code for your own boards, and creating a visualizer tool to display sensor data. By the end of the book, we are using MicroPython, computer vision, and machine learning (ML) to build an object detection system using the OpenMV Camera.I know many embedded systems developers who are devoted to C, but although C is incredibly powerful, it also provides you with a lot of ways to mess up (I found most of them on my own). I also know developers who started off by dipping their toes in the MicroPython waters and who subsequently became ardent users, especially for things like sensor evaluation and rapid prototyping.If you are an embedded systems developer, then the worst-case scenario is that reading this book could give you “another string to your bow” -- but beware, because you may find yourself sliding down the slippery slope to becoming a MicroPython advocate.
Amazon Verified review Amazon
Brick Sep 16, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Summary:This is not a book of elevated discussions about the choice of a programming language for embedded systems development. Rather, it is a compendium of detailed information about creating embedded systems with MicroPython as the software programming language.The sub-title, “A do-it-yourself guide for embedded developers to build a range of applications using Python”, is apt. And the book gives a more complete description of the development process than is true of most, yet is not too deep for the less experienced to enjoy.***** *****My impressions?Cons:Let me get the “cons” out of the way first, because they are few and no doubt mostly picky.I found the changing fonts distracting. This grabbed my attention as I paged through the book for the first time--perhaps because in many technical publications differing fonts express meaning, which is not the case here.In addition, some of the color images seemed indistinct. The effect was small but noticeable.And there were some places that my pseudo-English major’s brain wanted to challenge for grammar or style. But not content. That’s pretty much it. My list of “pros” is much more pertinent.Pros:The thing I like most about this book is that it is so complete in describing the topic at hand, and yet concise. This author was not “paid by the word”, as Mom used to say.I liked the introductory project, which lays the groundwork for a consistent, evolving path through the book. This begins in Chapter 3 following introductory information about the development environment.Another 'pro' for me is the choice and sequence of chapter topics. Though having different targets, they build on the previous work, progressing to the most complex and challenging projects in digestible steps.Subjectively and last on my list is the book’s aptness for those with experience in embedded systems development, but with little or no experience in using Python as the implementation language. Given the continuing rise of Python in surveys of programming languages, and its reputed productivity in terms of net code creation per programmer-hour, it’s a natural move to find a way to use it in embedded systems.Making me glad I read the book. It has been worth every minute. There’s more to say below.***** *****Recommendation:The book is packed with well thought-out information. There is much more detail in these chapters than in most such books I have read. And in very understandable form. So my recommendation is that if you want a practical manual for implementing an embedded system programmed in Python, this is an excellent choice.I believe an experienced developer or sufficiently interested person will be able to create the work described in the successively more advanced projects. It is a challenging book for those with little experience, but not beyond them. [NB--I am testing this assertion. Update forthcoming]***** *****Comments on Chapters:There are some huge additional contributions beyond the example projects themselves, including:Chapter 2 has a succinct discussion of alternative ways to manage real-time tasks, noting their pros and cons.Chapter 3 is a meat-and-potatoes exposition of a real, viable project—attaching an external I/O port-expander to the system and creating the necessary driver in MicroPython. Exactly why most will pick up the book.Later chapters (7, 8, 9) describe in equally thorough terms more challenging projects:“Device Control Using Gestures”, “Automation and Control Using Android”, and “Building an Object Detection Application Using Machine Learning”In addition to the project details there is more to be had in these chapters:Chapter 4 “Developing an Application Test Harness” gives relatively brief but well-described and usable info on a test/debug tool which I personally knew little about; so, I learned a great deal.Chapter 5 “Customizing the MicroPython Kernel Start Up Code” goes places I wish I would never go. At least yet. A good description of how to go about customizing the kernel’s start up code should you need to, and suggestions of things that might lead you there.Chapter 6 “A Custom Debugging Tool to Visualize Sensor Data” is, for me, the unexpected jewel of the book. So often I have struggled to make an embedded system yield enough information to help me find and fix what is not working. You know?It's like the software debugger’s equivalent of a hardware engineer’s oscilloscope. A quote from the chapter’s summary: “***transport sensor and debugging information*** from our device to a computer that ***then visualizes what is happening*** on our system. This can be critical to monitoring key variables, debug statements, or just creating a sensor dashboard.” [*** emphasis mine] What a valuable tool to have at hand during bring-up and debug!Chapter 10 “The Future of MicroPython”, concludes the book with thoughts about the advance of MicroPython, current real-world implementations, the pyboard D-series as a MicroPython platform, and conjecture about MicroPython’s future.Lastly, Appendix A “Downloading and Running MicroPython Code” explains in good detail how to do that, assuming you’re using the same or compatible µC board (“pyboard”--there is a link to a MicroPython tutorial for it).I also valued the extensive links and references to external resource materials throughout the body of the book and at the end of each chapter.And lastly, Chapter 1 titled “Down the Rabbit Hole …” is a bit like that literary adventure in “Alice’s Adventures in Wonderland”. By which I mean it first seemingly wanders from idea to idea, but ultimately segues to topics related to the book’s title including other programming languages, use cases for MicroPython and evaluation of whether to use it, and selecting a development platform.***** *****External resources:This quote from Chapter 10 is representative of the frequently cited external resources which enrich the reader:“There are two really good resources that you can review, which provide a great overview ofhow software should be developed. It can be found and downloaded for free by performinga simple web search.The first is the IEEE Software Engineering Body of Knowledge (SWEBOK). The SWEBOK is a free download from IEEE, which covers the best practices that engineers should be following when they develop software along with processes and strategies.Second, Renesas offers a Synergy Software Quality Handbook that they developed when they were creating their Renesas Synergy™ Platform. Their quality guide describes the processes that they used to develop and validate their software. This document has several gems that both professional and novice software developers will find extremely interesting–and worth implementing in their own software development processes.”***** *****Final thoughts:These projects, suggestions, references, and pointers to them found in “MicroPython Projects” have expanded my understanding and skills in a domain that is new to me and very promising. If that's your goal too, I believe you'd benefit from reading it.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.

Modal Close icon
Modal Close icon