There’s always one more question ;)
I can control the PICADE HAT with GPIO as above but since I cannot find a legal Space Invaders ROM for RetroPie, I need to develop this more.
I have found a very good Python Space Invaders program on github but it uses key.get_pressed() and event.get(), KEYDOWN, etc to detect keys. That’s fine for the keyboard but I also want detect the PICADE HAT joystick and Fire button.
So I think I either need to:
- Be able to mix get events with GPIO (first attempt at a GPIO detector to stuff the keyboard didn’t work)
- Ignore RetroPie and just install the PICADE HAT and use dtoverlay to map the joystick etc - that works when RetroPie is installed but not otherwise.
- Experiment another way…
The essentials are that I have a Raspberry Pi 3 with PICADE HAT, and the joystick, buttons and cables. I also have a Python 3 program which is expecting space to fire and left/right keys to move, and I want to have an alternative of the joystick and a button for those.
I will continue to experiment but if anyone has any helpful insights, I would be grateful.
Thanks, Nick