So I came across a library that lets you turn your TeensyLC/3.X into an xinput device. I only have a 2.0 on hand. I spend the past few hours messing around with the LC example to see if I could hack it over to work on a 2.0 board. Admittedly, it will take much more time analyzing everything before I can make a more educated attempt. I saw another project that is able to use the 2.0 as xinput devices but the firmware is only available in its hex form.

So I'm wondering what would be the best way to go here... all of the xinput code is in the /core/teensy3 directory. It has many spidering dependencies which will take a lot of time to go through and try and port(would that even work?). Is there a super "lite" version of the core that lets you fill out device descriptors/handshake/etc? If there is, the xinput just becomes a task of emulating the xinput packets.

Anyway, as this is my first usb input project, any suggestions would be greatly appreciated. Again, I already have the 2.0 and I know its possible so just getting a LC/3.X I'd like to avoid. I'm more just looking for direction on the best way to get started.


1 Answer 1


The Teensy 2.0 is a completely different MCU from the 3.0 with very different libraries.

USB on the 32U4 on the 2.0 typically uses the LUFA library for USB.

So to answer your question: I doubt it will be possible to port code written for the 3.0 SAMD based teensy to the AVR based 2.0 teensy without basically rewriting it from scratch.

The Arduino Leonardo also uses a 32U4 so you might want to look for examples code written for the Leonardo.

The examples from the LUFA library may be useful but they are not designed to be used with the Arduino IDE.

UPDATE From the comments, there is this project: https://github.com/bootsector/XInputPadMicro that uses LUFA and targets the Leonardo.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.