Help with Arduino/Teensy 3.2 Joystick

Status
Not open for further replies.

Loren42

Well-known member
Greetings! I just got here after getting my Teensy 3.2 working with Arduino on my Mac OS X. It's running one of the examples sketches in the Examples>Teensy>USB_Joystick>Complete.

A few questions.

First, it's doing pretty much what I want, except the analog channels are only at 10-bit resolution and I need 12 bits. I am guessing I need to modify the descriptor file, but I probably need to modify some other structures and code that Arduino conveniently hides. Can someone assist with some direction on how to find the files I need to modify and point me in the right direction?

Secondly, this program needs to run on an application specific non-Teensy board, but using the same processor (MK20DX256VLH7). My question is about pin assignments. It looks like the Arm is pretty flexible with reassigning pins (with some obvious limits). I'm okay with the 13 digital inputs currently used for the joystick software, but I need to add 15 more! Worst case I can get away with trading off 3 A/D channels if I have to, but the question is, what unused pins can I assign as inputs?

I'm only using 3 analog channel and the unattached pins in the drawing are what is not currently being used...

Thanks!

MK20DX256.jpeg
 
After some research I resolved my second question about GPIO.

If there is anyone that is knowledgeable about HID device descriptors that might get me started with modifying the Arduino descriptor file for the six analog channels to get 12-bits instead of 10-bits I would be most grateful.
 
I don't know much enough about the details of the descriptor reports myself, but i have had some experience modifying the files used for HID.

I did a quick google search and found This which might help you increase resolution

And have previously used This to add another joystick option separate from the default ones, it should help you find the files in which the descriptors are located, and which to modify.

Hope this helps, cheers
Weirdwolf
 
Status
Not open for further replies.
Back
Top