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

Thread: Teensy 3.2 Showing up as Keyboard/Mouse/Joystick

  1. #1

    Teensy 3.2 Showing up as Keyboard/Mouse/Joystick

    I use the Teensy 3.2 to handle control input on my Retropie projects but I cant figure out how to get it programmed to show up just as a Joystick.

    Within Arduino I see no option to set it up as just a game controller.

    Could someone please help me with this?

    Thank you

    Click image for larger version. 

Name:	teensy-help.jpg 
Views:	9 
Size:	149.1 KB 
ID:	15262

    - Rob

  2. #2

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    18,655
    You'll probably need to edit usb_desc.h, if you want to make a USB config different than the ones in the menu. See the lengthy comments in that file for instructions.

    On Windows, the default location to find that file is C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3. If you changed the location during install, or use the ZIP file, look in whatever location you chose to put Arduino on your PC.

  4. #4
    Quote Originally Posted by PaulStoffregen View Post
    You'll probably need to edit usb_desc.h, if you want to make a USB config different than the ones in the menu. See the lengthy comments in that file for instructions.

    On Windows, the default location to find that file is C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3. If you changed the location during install, or use the ZIP file, look in whatever location you chose to put Arduino on your PC.
    Thanks I will check that out and see if I cant get it to show up as just a game controller.

  5. #5
    No dice that didnt seem to change anything. Its still showing up in the Arduino list as "Keyboard+Mouse+Joystkick" and when uploading the sketch to the Teensy still yields the same result.

  6. #6
    This is the section of the usb_desc.h file I believe I need to edit. I tried erasing the unneeded interfaces and changing the PRODUCT_NAME line and the changes dont seem to reflect in Arduino or when I upload my sketch.

    Code:
    #elif defined(USB_HID)
      #define VENDOR_ID		0x16C0
      #define PRODUCT_ID		0x0482
      #define MANUFACTURER_NAME	{'T','e','e','n','s','y','d','u','i','n','o'}
      #define MANUFACTURER_NAME_LEN	11
      #define PRODUCT_NAME		{'K','e','y','b','o','a','r','d','/','M','o','u','s','e','/','J','o','y','s','t','i','c','k'}
      #define PRODUCT_NAME_LEN	23
      #define EP0_SIZE		64
      #define NUM_ENDPOINTS         6
      #define NUM_USB_BUFFERS	24
      #define NUM_INTERFACE		5
      #define SEREMU_INTERFACE      2	// Serial emulation
      #define SEREMU_TX_ENDPOINT    1
      #define SEREMU_TX_SIZE        64
      #define SEREMU_TX_INTERVAL    1
      #define SEREMU_RX_ENDPOINT    2
      #define SEREMU_RX_SIZE        32
      #define SEREMU_RX_INTERVAL    2
      #define KEYBOARD_INTERFACE    0	// Keyboard
      #define KEYBOARD_ENDPOINT     3
      #define KEYBOARD_SIZE         8
      #define KEYBOARD_INTERVAL     1
      #define KEYMEDIA_INTERFACE    4	// Keyboard Media Keys
      #define KEYMEDIA_ENDPOINT     6
      #define KEYMEDIA_SIZE         8
      #define KEYMEDIA_INTERVAL     4
      #define MOUSE_INTERFACE       1	// Mouse
      #define MOUSE_ENDPOINT        5
      #define MOUSE_SIZE            8
      #define MOUSE_INTERVAL        1
      #define JOYSTICK_INTERFACE    3	// Joystick
      #define JOYSTICK_ENDPOINT     4
      #define JOYSTICK_SIZE         12	//  12 = normal, 64 = extreme joystick
      #define JOYSTICK_INTERVAL     2
      #define ENDPOINT1_CONFIG	ENDPOINT_TRANSMIT_ONLY
      #define ENDPOINT2_CONFIG	ENDPOINT_RECEIVE_ONLY
      #define ENDPOINT3_CONFIG	ENDPOINT_TRANSMIT_ONLY
      #define ENDPOINT4_CONFIG	ENDPOINT_TRANSMIT_ONLY
      #define ENDPOINT5_CONFIG	ENDPOINT_TRANSMIT_ONLY
      #define ENDPOINT6_CONFIG	ENDPOINT_TRANSMIT_ONLY

Posting Permissions

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