SX1509 PWM I/O expander library needed [solved]

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
easylab4kids
Posts: 7
Joined: Mon Aug 12, 2019 10:58 am

SX1509 PWM I/O expander library needed [solved]

Post by easylab4kids » Wed Oct 21, 2020 10:34 am

UPDATE: Library here --> viewtopic.php?f=14&t=9225
This topic is solved. See above.

=============
I'm in need of a Micropython library for the SX1509 IO expander with PWM. Sparkfun has an SX1509 lib for Arduino.
My experience with writing libs & manipulating I2C-registers is sketchy at best .

If none exist i will try creating a lib, though I cant make sense of the chip-register commands as defined in its datasheet.

If anyone made a lib, or has an example which can be ada[ted please share.

SX1509 breakout:
Image
Last edited by easylab4kids on Wed Oct 28, 2020 11:53 pm, edited 4 times in total.

easylab4kids
Posts: 7
Joined: Mon Aug 12, 2019 10:58 am

Re: SX1509 PWM I/O expander library needed

Post by easylab4kids » Wed Oct 21, 2020 8:19 pm

My first attempt at a library.
Any improvements, please let me know!

https://github.com/pappavis/micropython-sx1509-library

scruss
Posts: 36
Joined: Sat Aug 12, 2017 2:27 pm

Re: SX1509 PWM I/O expander library needed

Post by scruss » Thu Oct 22, 2020 3:14 pm

Ooh, neat — thanks!

While the PWM expander looks super useful, what caught my eye about this chip was its ability to decode a debounced keyboard matrix of up to 8×8 keys. Too much bad code has been written to manage keyboards, and this chip has the potential to make most of it go away.

Post Reply