Hello everyone,
I’m working on a project with my Pi-Top [4], and I’m trying to control the OLED display so that it remains off by default and only turns on when I press a specific button. Here’s what I’ve done so far:
- Script to Control OLED: I wrote a Python script using the
pi-top
command to clear the display and turn it off initially. When I press the button, the OLED displays a message, and when I press it again, it clears the display. - Current Behavior: The script works to an extent—the display turns off as intended, but it comes back on after a few seconds, even if I don’t press the button again. I suspect this might be due to some background service or process that reinitializes the OLED.
- Tried Solution: I considered stopping the
pt-device-manager
service or similar processes that might be controlling the OLED, but I feel this might not be the best approach. I want to avoid disabling essential services if possible.
Script is in the attachment
My Questions:
- Has anyone successfully managed to control the OLED display in a similar way without the screen turning back on by itself?
- Is there a recommended method for fully controlling the OLED power or display state without stopping important services like
pt-device-manager
? - Could there be another service or process responsible for this behavior, and how can I manage it properly?
Any advice or suggestions would be greatly appreciated! Thank you in advance for your help.