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...