I2C/SPI GPIO expander support?

Hi there! New to this forum, so I hope I’m doing this right! I’m wondering if I2C or SPI I/O expanders could ever be supported in Klipper (MCP23017, MCP3008, etc.) Thinking of this because I think it’d be neat to design an RP2040-based mainboard with a few I/O expanders on it. That could be a really cheap and easy solution in terms of mainboards.

Has this been discussed before? I searched around and couldn’t find anything. I have decent Python skills and preliminary C skills if a PR for this would be welcome, but I might need someone to point me in the right direction. I also have the hardware on hand to do some tests. Thanks!

sx1509 is already supported. Looks like it is done entirely in python, no mcu code is needed.

From the documentation: “Due to the delay incurred by I2C communication you should NOT use SX1509 pins as stepper enable, step or dir pins or any other pin that requires fast bit-banging.”

klipper/sx1509.py at master · Klipper3d/klipper (github.com)

Configuration reference - Klipper documentation (klipper3d.org)

1 Like

Also see:


1 Like