Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • gabeg
    Post count: 3

    I bought some joysticks and buttons for my arcade machine. The controller they came with didnt work with the Pi, and I bought a cheap-o USB keyboard with the intentions of soldering onto the board, but Im not as good of a solderer I thought I was. So I am now using my arduino (I have an UNO and a Micro) and I wrote code for it to spit out ASCII text, making it work like a keyboard from the perspective of the pi. My problem is that in order for games to work smoothley, moving a person for example, youd need it to show that a button is being held in. However the only way I know to do this is by letting it send many, MANY letters. This makes navigating emulation station virtually impossible as a single click sends about 20 ascii letters….20 button presses. So I changed it by adding delay, now navigating emulation station is beautiful, but no games work because to the pi a button is being pressed for 1 millisecond every 175 milliseconds. Any ideas on how to fix this??? Id rather not change any code on the pi, theres got to be something to do with the arduino to get this to work.

    Post count: 20

    I’m not sure how you wired it up – is the Arduino acting as USB HID device to the RPi?

    I built a pinball controller using an Arduino Leonardo as USB HID “Gamepad”. That way I could use analog axis, tilt sensor, and of course some buttons. I use it for my pc pinball simulators and not configured for retropie, but I expect it not having the issues you describe, at least jstest looks all good.

    If you want to turn a Leonardo (or Micro) into a custom USB HID, you have to change some C header files and create a suitable HID descriptor.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.