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: 20
Joined: Mon Aug 12, 2019 10:58 am
Location: Ellisras, Suid-Afrika ("South Africa")

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 adapted please share.

SX1509 breakout:
Image
Last edited by easylab4kids on Mon Jan 03, 2022 10:37 am, edited 5 times in total.
met vriendelijke groet,
Easylab4kids.nl

easylab4kids
Posts: 20
Joined: Mon Aug 12, 2019 10:58 am
Location: Ellisras, Suid-Afrika ("South Africa")

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
met vriendelijke groet,
Easylab4kids.nl

User avatar
scruss
Posts: 360
Joined: Sat Aug 12, 2017 2:27 pm
Location: Toronto, Canada
Contact:

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