Skip to content

Conversation

@UncleRus
Copy link

Moving from RPi.GPIO to libgpiod (using Python gpiod bindings) enables support for GPIO buttons and incremental encoders across any modern Linux system, not just Raspberry Pi. To further enhance this compatibility, the I2C_PORT parameter has been introduced, allowing the use of any available I2C bus for GPIO, rather than being restricted to bus 1.

This PR was created during the work to get Peppy running on OrangePi 3B.

@UncleRus UncleRus changed the title feat: drop RPi.gpio dependency (switch to libgpiod), add i2c bus selrection feat: drop RPi.gpio dependency (switch to libgpiod), add i2c bus selection Jan 12, 2026
@project-owner
Copy link
Owner

Hi, thank you for providing the PR!
Was there any issue with RPi.gpio on OrangePi?
I cannot test the changes at the moment. How did you test it?
Thanks!

@UncleRus
Copy link
Author

Hi! The Orange Pi doesn't and can't have the RPi.gpio library. However, all modern Linux versions support libgpiod (with gpiod Python bindings). So, I simply rewrote these parts of the code. This was tested on an Orange Pi 3B (Rockchip RK3566), but should work on any single-board computer, including the Raspberry Pi.

@project-owner
Copy link
Owner

OK, please squash commits into one. The whole player code was written without using input/output data types. Is it possible to do the same for your changes? Also the naming convention for the code in player doesn't use underscore as a variable/function name prefix.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants