@craggus2000 Thanks for reporting back. Have fun. Please edit your first post and add in the something like [solved], so it is more likely to be picked up by search engines.
@mitu
When I tried using gpionext I kept being met with error messages. I ended up just getting a few different parts to work with the super pi girl drivers. Still, thank you for the help.
One more piece of the puzzle...at the end of my script, if I remove the GPIO.cleanup(), then the light stays on.
But, in subsequent calls to my script, I receive a warning that the channel is already in use. It doesn't stop the code, but the programmer in me doesn't like warnings.
My question now is why does the cleanup function change the output of the GPIO pins?
That's not needed, since PikeyD doesn't look like it uses python. There's - similarly - a Linux kernel module named uinput, that I think it's used, but it's loaded by default on a RetroPIe image (you can check /etc/modules).
It seems you do need to install something - see the manual:
Once connected and booted up, you can navigate to the terminal to install the required
gpio drivers.
In RetroPie, you can do this by pressing the Ctrl-Alt and F4 key; this changes view to a
virtual terminal window, which you can run ‘emulationstation’ to go back to
RetroPie.
...
It looks like you need to install GPIONext, a GPIO user driver to make the gamepad(s) work.
FYI My friend 'sana2dang' made original code for me and I just add little bit.
Although I am not using this any more and moved to RGB effect using Aruino :) but worth trying