Please do not post a support request without first reading and following the advice in

Help! Teensy LC and Retropie, can't configure controllers. Very weird!

  • Hi all, posting this helping that someone can help- and leaving this for anyone else who is having the same problems.

    I'm making a portable console using a Raspberry pi 3 and Retropie. I've wired all my buttons to the Teensy LC, but it won't let me configure any buttons. The Teensy is found, and I can hold buttons to detect the controller and get to the button defining screen, but I then can't define any buttons.

    I've had this exact config working before, but for whatever reason, it now doesn't!

    I've tried two lots of code on the Teensy, the example in the Arduino IDE called "Complete" and some custom code that I have written. (See below) both give the same results.

    Weird things that happen...

    • When I get in, only the UP button can be defined?!
    • It says there are 2 gamepads connected (there is only 1)
    • When I press a button it seems to HOLD it instead?

    Things I've tried / checked

    • All buttons work in Windows, and its picked up as a controller
    • Reinstalling Retropie from scratch
    • Configuring a keyboard, and then going back to configure the Teensy (no dice)
    • 3 different USB cables
    • Soldering direct to the Pi3 (same problem)
    • Stripping out all the code, and just having two buttons (same problem)

    Getting towards my wits end, I've been at this for a while now!

    Would appreciate any help from anyone!



    void setup() {
      pinMode(0, INPUT_PULLUP); // digital up   blue
      pinMode(1, INPUT_PULLUP); // digital down   red
      pinMode(2, INPUT_PULLUP); // digital left  yellow
      pinMode(3, INPUT_PULLUP); // digital right     green      brown and orange are ground
      pinMode(4, INPUT_PULLUP); // b  grey
      pinMode(5, INPUT_PULLUP); // a   purple
      pinMode(6, INPUT_PULLUP); // y   brown
      pinMode(7, INPUT_PULLUP); // x   white    blk ground
      pinMode(8, INPUT_PULLUP); // select   brown
      pinMode(9, INPUT_PULLUP); // start   orange     red is ground
      pinMode(10, INPUT_PULLUP); // l1
      pinMode(11, INPUT_PULLUP); // r1
      pinMode(12, INPUT_PULLUP); // l2
      pinMode(13, INPUT_PULLUP); // r2
      pinMode(14, INPUT_PULLUP); //analog stick 1 x
      pinMode(15, INPUT_PULLUP); //analog stick 1 y
      pinMode(16, INPUT_PULLUP); //analog stick 2 x
      pinMode(17, INPUT_PULLUP); //analog stick 2 y
      pinMode(18, INPUT_PULLUP); // admin button 1
      pinMode(19, INPUT_PULLUP); // admin button 2
    void loop() {
      // read analog inputs and set X-Y position
      // read the digital inputs and set the buttons
      Joystick.button(1, digitalRead(0));
      Joystick.button(2, digitalRead(1));
      Joystick.button(3, digitalRead(2));
      Joystick.button(4, digitalRead(3));
      Joystick.button(5, digitalRead(4));
      Joystick.button(6, digitalRead(5));
      Joystick.button(7, digitalRead(6));
      Joystick.button(8, digitalRead(7));
      Joystick.button(9, digitalRead(8));
      Joystick.button(10, digitalRead(9));
      Joystick.button(11, digitalRead(10));
      Joystick.button(12, digitalRead(11));
      Joystick.button(13, digitalRead(12));
      //Joystick.button(14, digitalRead(13));
      //Joystick.button(15, digitalRead(14));
      Joystick.button(18, digitalRead(17));
      Joystick.button(19, digitalRead(18));
      Joystick.button(19, digitalRead(19));
      // a brief delay, so this runs 20 times per second

  • I'm having the same issue with Teensy LC. The symptoms are exactly like Were you ever able to find a solution?

Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.