Teensy2.0 -> Teensy LC HID button box

Sprool

Active member
I now have a teensy LC to drive my project - 5 x 4 button matrix plus 5 rotary encoders as USB HID game controller. I imported the working code from the Teensy 2 project, after modifying the pin refs accordingly, but am getting an error when verifying; "'Joystick' was not declared in this scope".

In fact I had commented out the #include <Joystick.h> from the original button box as it gave an error and it worked fine without it, but the Teensy LC seems to need it.
If I uncomment the call to <joystick.h> I get this:
'fatal error: PluggableUSB.h: No such file or directory. Compilation terminated.

Does this mean I'm missing a library somewhere? If so how can I resolve it? How come the Teensy2 seems to run fine without it?
 
N/mind, its fixed, I loaded the code in anyway then changed in tools - USB type> keyboard/joystick/mouse.
 
The same Tools > USB Type menu exists for Teensy 4.0.

If that doesn't fully solve your problem, we still might be able to help, but you need to show us enough to at least see the issue, and ideally complete enough info to reproduce the problem. Nobody can diagnose and solve such a problem with zero information to see what's wrong.
 
Back
Top