Skip to content

Conversation

@jonaskor
Copy link

@jonaskor jonaskor commented Nov 30, 2025

Updated GPIO button script for OLED Phoniebox to include software debounce and improved button handling. Also re-enabling I2C (display disabled if not active). Code changes suggested by copilot, tested by me.

Root cause: Bookworm’s default gpio backend produces very-rapid spurious edges for your hardware that were interpreted as many presses; Bullseye used a different backend and did not show this behavior.
Fix applied to gpio-buttons.py (on-device): added a backend-agnostic software debounce wrapper for when_pressed handlers plus a small bounce_time — this prevents the sub-millisecond PRESSED/RELEASED bursts from firing multiple actions while leaving when_held behavior intact. After that change the service starts normally and the duplicate-presses are gone on Bookworm device.
Display works as usual after I2C is reenabled.

Updated GPIO button script for OLED Phoniebox to include software debounce and improved button handling.
Add command to enable I2C interface via raspi-config.
@jonaskor jonaskor changed the title Refactor gpio-buttons.py for debounce and clarity Fixes for Raspberry Os Bookworm: Refactor gpio-buttons.py for debounce and clarity / re-enable I2C to active display Nov 30, 2025
Updated README to reflect changes in project details, installation instructions, and troubleshooting steps for the oled_phoniebox fork.
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.

1 participant