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

Writing a MicroPython Driver for an I/O Expander

The ability to design and implement a driver is an important skill in embedded software development. Whether the driver is for an internal peripheral or for external sensors and input/output (I/O) capabilities, developers need to design and construct drivers that are flexible and scalable.

In this chapter, we will explore how to properly design drivers by implementing a project that uses an external I/O chip to interface with an RGB LED pushbutton. We will design a MicroPython driver to perform I/O using the external chip and to drive the RGB LEDs using the pyboard's Pulse Width Modulation (PWM) channels.

The following topics will be covered in this chapter:

  • The RGB pushbutton I/O expander project requirements
  • The hardware and software architecture design
  • Creating the class outline
  • Project construction
  • Testing and verification...
lock icon The rest of the chapter is locked
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 £16.99/month. Cancel anytime