ThirdEarthDesign
Member
In case anyone finds it helpful I've put together a guide on how to create a custom joystick interface for the Teensy 4.1.
The guide includes adding a custom USB Type to the Teensy boards list for the Arduino IDE, creating your own custom joystick interface and adding it to usb_desc.h, as well as creating your own USB HID descriptor in usb_desc.c, and finally bringing it all together by updating the usb_joystick.h file and getting all your data bits in line.
It retains the normal and extreme joystick configurations so all the stock Teensy USB Type options are unaffected, but it lets you have a standalone joystick interface without needing to have the extra devices/interfaces that come with the 'Keyboard + Mouse + Joystick' or the 'Flight Sim Controls + Joystick' USB types. I've also attached the four modified files here for convenience.
I guess I consider it something of an update to the article that's currently posted on the PJRC | Using USB Joystick page - 'Kenton Hamaluik wrote a guide to making a custom Joystick on Teensy 3.0'.
My guide can be found on my website here (no ads, nothing for sale):
https://www.thirdearthdesign.com/projects/custom_joystick_teensy4_1
More about the finished project that prompted me to do this can be found here:
https://forum.pjrc.com/index.php?th...a-custom-teensy-4-1-joystick-interface.75119/
The guide includes adding a custom USB Type to the Teensy boards list for the Arduino IDE, creating your own custom joystick interface and adding it to usb_desc.h, as well as creating your own USB HID descriptor in usb_desc.c, and finally bringing it all together by updating the usb_joystick.h file and getting all your data bits in line.
It retains the normal and extreme joystick configurations so all the stock Teensy USB Type options are unaffected, but it lets you have a standalone joystick interface without needing to have the extra devices/interfaces that come with the 'Keyboard + Mouse + Joystick' or the 'Flight Sim Controls + Joystick' USB types. I've also attached the four modified files here for convenience.
I guess I consider it something of an update to the article that's currently posted on the PJRC | Using USB Joystick page - 'Kenton Hamaluik wrote a guide to making a custom Joystick on Teensy 3.0'.
My guide can be found on my website here (no ads, nothing for sale):
https://www.thirdearthdesign.com/projects/custom_joystick_teensy4_1
More about the finished project that prompted me to do this can be found here:
https://forum.pjrc.com/index.php?th...a-custom-teensy-4-1-joystick-interface.75119/