Raspberry Pi as Keyboard output with GPIO as keypress

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
RobbyTheBrobot
 
Posts: 1
Joined: Mon Nov 16, 2020 10:45 pm

Raspberry Pi as Keyboard output with GPIO as keypress

Post by RobbyTheBrobot »

Hello everyone. I am trying to setup my raspberry pi zero has a keyboard device with the gpio's being the catalyst for keypresses. End goal is I'm trying to mod a retro game controller to be a usb controller using my pi zero as the brains.

What I have so far:
following this guide http://www.isticktoit.net/?p=1383 I have the pi zero show up as a USB device and using SSH I can input "echo -ne "\0\0\x4\0\0\0\0\0" > /dev/hidg0 #press the A-button" and my computer will just be doing aaaaaaaaaaaaaa as expected, so cool, we are getting usb input.

Next I followed this guide https://learn.adafruit.com/retro-gaming ... s-software.
And got the stuff installed for registering gpio as key inputs. Now im stuck at the point of how do I translate the gpio retrogame keypresses back through to my computer to be picked up as keypresses?
And im open to easier ways to do this lol.
Thanks!

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”