{"id":19871428,"url":"https://github.com/esp32beans/usbnunchuck","last_synced_at":"2025-05-02T09:30:34.763Z","repository":{"id":168410500,"uuid":"563138829","full_name":"esp32beans/USBnunchuck","owner":"esp32beans","description":"Convert Wii Nunchuck to USB joystick without soldering using CircuitPython","archived":false,"fork":false,"pushed_at":"2024-08-27T02:03:36.000Z","size":897,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T00:37:15.725Z","etag":null,"topics":["circuitpython","joystick","nunchuck","nunchuk","usb","usb-hid","wii"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/esp32beans.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-08T01:33:55.000Z","updated_at":"2024-08-27T02:03:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"511efcb6-391a-4ebc-8d8a-3e7398e9be96","html_url":"https://github.com/esp32beans/USBnunchuck","commit_stats":null,"previous_names":["esp32beans/usbnunchuck"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esp32beans%2FUSBnunchuck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esp32beans%2FUSBnunchuck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esp32beans%2FUSBnunchuck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esp32beans%2FUSBnunchuck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/esp32beans","download_url":"https://codeload.github.com/esp32beans/USBnunchuck/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252015717,"owners_count":21680815,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["circuitpython","joystick","nunchuck","nunchuk","usb","usb-hid","wii"],"created_at":"2024-11-12T16:12:19.542Z","updated_at":"2025-05-02T09:30:33.795Z","avatar_url":"https://github.com/esp32beans.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Convert Wii Nunchunk to USB Joystick without soldering\n\n![Photo of nunchuck connected to adapter and QT Py ESP32-S3](./images/USBnunchuck.jpg)\n![Photo of Xbox Adaptive Controller with nunchuck connected to QT Py 2040 and 4 arcade buttons](./images/xac_nunchuck_4buttons.jpg)\n\n## Hardware\n\nThis project uses the same hardware as https://github.com/esp32beans/USBnunchuck_mouse.\n\n* Adafruit QT Py ESP32-S3 with STEMMA QT, no PSRAM\n* Adafruit QT Py RP2040\n* Adafruit Trinkey QT2040 - RP2040 USB Key with Stemma QT\n* Adafruit Feather RP2040\n* Adafruit STEMMA QT/Qwiic JST SH 4-pin cable\n* Adafruit Wii Nunchuck Breakout Adapter - Qwiic/STEMMA QT\n* Adafruit Wii controller (Nunchuck/Wiichuck)\n* USB cable with Type C connector for the ESP32-S3 and the appropriate connector for your computer.\n\nPlug the boards together as shown below. No soldering is needed.\n\nOnly one of the QT Py, Trinkey, and Feather boards is needed. The Trinkey is\nthe cheapest. The RP2040 boards do not have WiFi or Bluetooth so are cheaper\nand use much less power.\n\nThe ESP32-S3 includes WiFi and Bluetooth Low Energy which are not currently\nused but might be in the future. The ESP32-S3 requires powering the XAC using a\nwall adapter because the ESP32 uses much more current than the other boards.\nThe arcade buttons currently do not work on this board.\n\n```\nESP32-S3 --STEMMA-- Nunchuck adapter -- Nunchuck controller\nQT Py RP2040 --STEMMA-- Nunchuck adapter -- Nunchuck controller\nTrinkey QT2040 --STEMMA-- Nunchuck adapter -- Nunchuck controller\nFeather RP2040 --STEMMA-- Nunchuck adapter -- Nunchuck controller\n```\n\nAdd four 30mm arcade buttons so the joystick has a total of six buttons. Still no\nsoldering. The arcade button board is sold without the buttons and cables.\n\n* Adafruit LED Arcade Button 1x4 - STEMMA QT I2C Breakout - STEMMA QT / Qwiic\n* Adafruit STEMMA QT/Qwiic JST SH 4-pin cable\n* 4 X Arcade Button with LED - 30mm\n* Arcade Button Quick-Connect Wire Pairs - 0.11\" (10 pack)\n\n## Tutorials\n\nRecommended only if you want to change the Python code. Or if you are new to\nCircuitPython. The first four guides include instructions on how to install\nCircuitPython on the respective boards.\n\n* [Adafruit QT Py ESP32-S3](https://learn.adafruit.com/adafruit-qt-py-esp32-s3)\n* [Adafruit QT Py RP2040](https://learn.adafruit.com/adafruit-trinkey-qt2040)\n* [Adafruit Trinkey QT2040](https://learn.adafruit.com/adafruit-qt-py-2040)\n* [Adafruit Feather RP2040](https://learn.adafruit.com/adafruit-feather-rp2040-pico)\n* [Customizing USB Devices in CircuitPython](https://learn.adafruit.com/customizing-usb-devices-in-circuitpython/hid-devices)\n* [Adafruit Wii Nunchuck Breakout Adapter](https://learn.adafruit.com/adafruit-wii-nunchuck-breakout-adapter)\n\nThis guide is for the arcade button board.\n\n* [Adafruit LED Arcade Button 1x4 STEMMA QT](https://learn.adafruit.com/adafruit-led-arcade-button-qt)\n\n## CircuitPython files\n\ncode.py is a renamed copy of nunchuk.py.\n\nCircuitPython files and directories\n\n```\nCIRCUITPY/\n├── boot_out.txt\n├── boot.py\n├── code.py\n├── hid_joystick.py\n└── lib\n    ├── adafruit_bus_device\n    │   ├── i2c_device.mpy\n    │   ├── __init__.py\n    │   └── spi_device.mpy\n    ├── adafruit_hid\n    │   ├── consumer_control_code.mpy\n    │   ├── consumer_control.mpy\n    │   ├── __init__.mpy\n    │   ├── keyboard_layout_base.mpy\n    │   ├── keyboard_layout_us.mpy\n    │   ├── keyboard.mpy\n    │   ├── keycode.mpy\n    │   └── mouse.mpy\n    ├── adafruit_nunchuk.mpy\n    └── adafruit_seesaw\n        ├── analoginput.mpy\n        ├── attiny8x7.mpy\n        ├── attinyx16.mpy\n        ├── crickit.mpy\n        ├── digitalio.mpy\n        ├── __init__.py\n        ├── keypad.mpy\n        ├── neopixel.mpy\n        ├── pwmout.mpy\n        ├── robohat.mpy\n        ├── rotaryio.mpy\n        ├── samd09.mpy\n        ├── seesaw.mpy\n        └── tftshield18.mpy\n```\n\n## Two Stick example\n\n```\n├── two_stick\n│   ├── boot.py\n│   ├── cp_xac_joystick.py\n│   ├── hid_joystick.py\n│   ├── LICENSE\n│   ├── README.md\n```\n\nThe two_stick example controls both Xbox Adaptive Controller joysticks\nusing one nunchuk.\n\nThe two_stick example uses the same CP libs and hardware but presents the\nUSB joystick with X axis, Y axis, an 8 way directional pad (dpad), and\ntwo buttons.\n\nThe Windows joystick control panel shows the nunchuk thumb stick controls the\nUSB joystick X and Y axes as before. Tilting the nunchuk controls the USB\njoystick dpad. This means means one nunchuk can control the X, Y, dpad, and two\nbuttons.\n\nWhen plugged into an Xbox Adaptive Controller (XAC), the dpad can be mapped to\neither the XAC left or right joystick. The result is one nunchuk can control\nboth the XAC left and right joysticks. This requires the XAC run the firmware\nreleased in June 2024 or newer. The latest XAC firmware can be installed using\nthe Xbox Accessory app on an Xbox console or a Windows PC.\n\nThe following explains how to map the XAC dpad buttons to the XAC right\njoystick.\n\nhttps://github.com/touchgadget/xac_onehand_controller\n\n## Two Stick Alt example\n\n```\n├── two_stick_alt\n│   ├── boot.py\n│   ├── cp_xac_joystick.py\n│   ├── hid_joystick.py\n│   ├── LICENSE\n│   ├── README.md\n```\n\nThe two_stick_alt example controls both Xbox Adaptive Controller joysticks\nusing one nunchuk. This version does not use the XAC direction pad so does not\nrequire mapping the XAC dpad to an XAC joystick.\n\nThe two_stick_alt example uses the same CP libs and hardware but presents\nthe USB joystick with X axis, Y axis, X2 axis, Y2 axis, and two buttons.\n\nThe Windows joystick control panel shows the nunchuk thumb stick controls\nthe USB joystick X and Y axes as before. Tilting the nunchuk controls the\nother/second USB joystick. This means means one nunchuk can control two\njoysticks and 2 buttons without using the Xbox Accessory app.\n\nThe nunchuk accelerometer used to detect tilting is not as precise as the\nthumb joystick so use the Xbox Accesory app to calibrate both joysticks.\nThe Xbox Accessory app can also change the joystick sensitivity so it can\nbe fine tuned to your style of play.\n\n## Testing as of Aug 24, 2024\n\nWorks on XBox Adaptive Controller.\n\nTested using CircuitPython 9.1.2. Files in lib/ directory from\nadafruit-circuitpython-bundle-9.x-mpy-20240822.zip\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesp32beans%2Fusbnunchuck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fesp32beans%2Fusbnunchuck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesp32beans%2Fusbnunchuck/lists"}