Home

Awesome

micropython-sx1509

This library provides a MicroPython port of the SparkFun SX1509 Arduino library, allowing you to control the SX1509 16-channel I/O expander with a Raspberry Pi Pico or any other MicroPython-compatible board. The SX1509 can handle multiple GPIO functionalities such as digital input/output, PWM, LED driver, and keypad reading, making it an excellent extension for projects requiring additional IOs.

Installation

To use this library, you must first copy the sx1509.py file to your MicroPython device. This can be done using any MicroPython file transfer tool compatible with your system.

Hardware Setup

To connect the SX1509 to your Raspberry Pi Pico, follow this basic wiring guide:

For specific functionalities like controlling an LED, connecting a button, or setting up a keypad, refer to the individual examples' hardware hookup sections.

Examples Overview

This library includes several demos showcasing different features of the SX1509:

Each example includes a detailed explanation of the hardware setup and the code required to run the demo.

Demo Project

There's a full write-up of a project using the SX1509 on my website Rototron or click picture below for a YouTube video:

ILI9341 Tutorial

Acknowledgments

This library is a MicroPython port of the original SparkFun SX1509 Arduino Library. Special thanks to SparkFun for their work on developing and maintaining the Arduino version of this library.

Contributing

Contributions to this library are welcome. Please submit pull requests or open issues on GitHub to suggest improvements or report bugs.

License

This project is licensed under the MIT License - see the LICENSE file for details.