Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
MicroPython Projects

You're reading from   MicroPython Projects A do-it-yourself guide for embedded developers to build a range of applications using Python

Arrow left icon
Product type Paperback
Published in Apr 2020
Publisher Packt
ISBN-13 9781789958034
Length 294 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Brad Stewart Brad Stewart
Author Profile Icon Brad Stewart
Brad Stewart
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Down the Rabbit Hole with MicroPython 2. Managing Real-Time Tasks FREE CHAPTER 3. Writing a MicroPython Driver for an I/O Expander 4. Developing an Application Test Harness 5. Customizing the MicroPython Kernel Start Up Code 6. A Custom Debugging Tool to Visualize Sensor Data 7. Device Control Using Gestures 8. Automation and Control Using Android 9. Building an Object Detection Application Using Machine Learning 10. The Future of MicroPython 11. Downloading and Running MicroPython Code
12. Assessments 13. Other Books You May Enjoy

Summary

In this chapter, we explored several different types of real-time scheduling techniques that can be used with a MicroPython project. We found that there are many different techniques that a MicroPython developer can leverage to schedule activities in their application. We found that each of these techniques has its place and varies based on the level of complexity a developer wants to include in their scheduler. For example, MicroPython threads can be used, but they are not fully supported in every MicroPython port and should be considered an in-development feature.

After looking at several techniques, we saw that the asyncio library may be the best choice for developers looking to get started with MicroPython. Python developers are already familiar with it and asyncio provides developers with cooperative scheduling capabilities that can provide them with the ability to handle asynchronous events in an efficient, non-blocking manner. This allows developers to get more out of their applications while wasting fewer cycles.

In the next chapter, we will explore how we can write drivers for a simple application that uses a push button to control the state of its RGB LEDs.

You have been reading a chapter from
MicroPython Projects
Published in: Apr 2020
Publisher: Packt
ISBN-13: 9781789958034
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at R$50/month. Cancel anytime