ricardo-reis
Member
Hello all,
I'm new to the USBHost_t36 library and i'm a little lost in regards to retrieving button data from a Joystick i have connected to a Teensy 4.1.
Using the Joystick.ino example, it detects the HID Joystick i'm using, it also reads the data from the xyz axis (different ranges, but will worry about that later), but when it comes to buttons, it outputs a sum of the button readings (imagine - one button press outputs buttons: 100, the second button would output buttons: 200, if i press both the output is buttons: 300). I've been looking through the code and i can't figure out where/why is that happening.
Using the HIDDeviceInfo.ino example, it also detects the Joystick and reads the data all in separate - 1s and 0s for the button presses, instead of what might be analog readings for the Joystick.ino example, but that's not really an issue.
So, my question is - is there a wiki that i could look at to try to figure out how to get the buttons inputs separated in the Joystick.ino example and develop that further for the project i'm aiming to use this with, or is there someone who's able to throw some pointers so i'm able to get this sorted?
If there's any more info/details that i can provide, please let me know.
(new to the forum too)
Thanks in advance!
I'm new to the USBHost_t36 library and i'm a little lost in regards to retrieving button data from a Joystick i have connected to a Teensy 4.1.
Using the Joystick.ino example, it detects the HID Joystick i'm using, it also reads the data from the xyz axis (different ranges, but will worry about that later), but when it comes to buttons, it outputs a sum of the button readings (imagine - one button press outputs buttons: 100, the second button would output buttons: 200, if i press both the output is buttons: 300). I've been looking through the code and i can't figure out where/why is that happening.
Using the HIDDeviceInfo.ino example, it also detects the Joystick and reads the data all in separate - 1s and 0s for the button presses, instead of what might be analog readings for the Joystick.ino example, but that's not really an issue.
So, my question is - is there a wiki that i could look at to try to figure out how to get the buttons inputs separated in the Joystick.ino example and develop that further for the project i'm aiming to use this with, or is there someone who's able to throw some pointers so i'm able to get this sorted?
If there's any more info/details that i can provide, please let me know.
(new to the forum too)
Thanks in advance!