[SOLVED] Teensy Joystick registering multiple events per button press

Home Forums RetroPie Project Controller Configuration in RetroPie [SOLVED] Teensy Joystick registering multiple events per button press

RetroPie has a new website and forum. Please visit https://retropie.org.uk/ for the new site. The new forum is located at https://retropie.org.uk/forum/. This forum is left here as a read-only archive.

This topic contains 3 replies, has 2 voices, and was last updated by Profile photo of theluthier theluthier 1 year, 1 month ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #115684
    Profile photo of theluthier
    theluthier
    Participant

    I’m building a rpi2 + retropie into a gameboy pocket. I’ve wired the GBP’s buttons to a Teensy and installed a generic USB Joystick sketch. I’ve tested the setup extensively on Mac and Linux machines, both working perfectly. However whenever I connect the Teensy to my rpi2 + retropie, the Teensy joystick registers as a dev/input/eventX instead of a dev/input/jsX – On my other linux machine, it registers as a dev/input/jsX.

    As an event, every button press registers multiple times per press. Here’s a video running the evtest command:

    https://goo.gl/photos/gQotv2zJyvpULThL9

    Based on my searching, it seems that the Teensy registering as an “event” instead of a “js” could be the issue. But I can’t find how to remedy the registration. Any advice on how to fix this so each button press registers once would be much appreciated!

    • This topic was modified 1 year, 2 months ago by Profile photo of theluthier theluthier.

    #115954
    Profile photo of theluthier
    theluthier
    Participant

    I managed to solve my problem. The issue seemed to come from the example sketch included with Teensyduino found under File > Examples > Teensy > USB_Joystick > Complete. I’m not an experienced arduino-er, but with that sketch the buttons seem to be sourced and updated using a “Joystick.send_now” command. When I modified the sketch to source and update based on the “bounce” method, the buttons worked as expected. The bounce method is used in another example sketch: File > Examples > Teensy > USB_Joystick > Buttons. Modifying that approach according to my setup was fairly simple to get it working.

    In the end, this really had nothing to do with RetroPie.

    • This reply was modified 1 year, 2 months ago by Profile photo of theluthier theluthier.
    #119214
    Profile photo of cluf20
    cluf20
    Participant

    Hello theluthier, can you post your sketch? I have the same problem!

    Thank You!

    #119851
    Profile photo of theluthier
    theluthier
    Participant

    Absolutely @cluf20! It’s maybe tailored toward my specific setup, but maybe you can derive something from it if you can’t use it as is.

Viewing 4 posts - 1 through 4 (of 4 total)

Forums are currently read only - please visit the new RetroPie forums at https://retropie.org.uk/forums/

Skip to toolbar