Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: Help with Arduino/Teensy 3.2 Joystick

  1. #1

    Help with Arduino/Teensy 3.2 Joystick

    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!

    Click image for larger version. 

Name:	MK20DX256.jpeg 
Views:	6 
Size:	108.5 KB 
ID:	20101

  2. #2
    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.

  3. #3
    Junior Member
    Join Date
    May 2020
    Posts
    5
    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

  4. #4
    Thank you! This helps me on my journey.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •