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

Thread: A usb controller adapter for the Nintendo switch

  1. #1
    Junior Member
    Join Date
    Nov 2018
    Posts
    1

    A usb controller adapter for the Nintendo switch

    Hi,

    I want to try to create an usb adapter for the Nintendo switch so I can use a Xbox one controller on it.
    Such adapters do already exist but I'd like to program one myself.

    I will be using (parts of) the following project https://github.com/shinyquagsire23/Switch-Fightstick to properly connect to the Nintendo switch.
    However, I do not know how I can make it so that I can plug my controller into the teensy which then plugs into the switch.

    What I guess that I will need is:
    • Teensy 2.0 (with pins) - will connect to the switch through its usb cable
    • USB Type A Female Breakout - so I can use a usb controller (such as the xbox one s controller)
    • Male PTH headers - to connect the usb female to the breadboard
    • Breadboard
    • Some cables to connect everything on the breadboard.


    Is that right or is there a better way to do this?

    I am new pretty new to micro controllers but I have a good background in software.

  2. #2
    Junior Member
    Join Date
    Dec 2018
    Posts
    1
    It would be nice if it could be programmed in Teensyduino using the `Joystick` object.

    I think you want to look at the `Descriptors.c` and `Descriptors.h` from the Fightstick repo, and look at the Teensyduino cores files from `hardware/teensy/avr/cores/usb_hid` (in macOS this is stored in `Arduino.app/Contents/Java/hardware`).

    More is needed than just `#define`-ing PRODUCT_ID, VENDOR_ID, STR_MANUFACTURER, and STR_PRODUCT.

    You'll probably need to read up on USB HID descriptors (https://eleccelerator.com/tutorial-a...t-descriptors/), (https://stackoverflow.com/a/21676286), (https://www.usb.org/hid).

    If this is done, something like https://github.com/havencking/teensy...er/tree/master could adapt a Wii Classic Controller to be adapted for the Switch.

    It may be worth while to look at some of the [forks of that repo](https://github.com/progmem/Switch-Fi...etwork/members) for possibly better documentation or readability...

Posting Permissions

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