Brightness control via hotkey combination in RetroPie
-
Hi guys,
I’d like to control the duty cycle of my PWM signal on GPIO12 (Raspberry Pi CM4) to control the LED brightness of my 5” display with a hot key combination (ideally holding select, and then using up and down on the DPAD to control the duty cycle in 10 steps, for example) for my portable gaming handheld I’m building (currently using TPS61160 boost converter).
Is there any python script or library to use to read the inputs of a generic USB controller via RetroArch? Ideally I’d just read the button inputs and time held in a script and then control the PWM signal output with a simple function.
Any help or reference to simple documentation would be appreciated! Thank you.
-
Use
triggerhappy
- https://github.com/wertarbyte/triggerhappy - it's already included in RasPI OS and you can just attach your PWM control scripts without having to deal with input processing.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.