Home > Arduino, Bluetooth, TKJ Electronics, USB > Wiimote added to USB Host library

Wiimote added to USB Host library

This is yet again a new announcement regarding the USB Host library. I just added support for the Wiimote via Bluetooth.
Check out the source code at github: https://github.com/felis/USB_Host_Shield_2.0/blob/master/Wii.cpp and the example sketch as well.
I will work on implementing support for the Nunchuck and Wii Motion Plus extension in the near future.

Update:
The library now also supports the Nunchuck controller and the Motion Plus extensions. The newest version of the library can be found at github.

Another Update:
The library now also work with the new Wiimote where the Motion Plus extension is built-in.
Check out my commit to see what where needed in order to make the new Wiimote work as well – the main difference is that you now have to send the data using the interrupt channel.
To tell if your Wiimote is the new type, it should have a label at the bottom saying “Wii MotionPlus INSIDE”. If you are in doubt take a look at this picture.

Yet another update:
The IR camera inside the Wiimote is now also supported. The the following commit for more information.

A new update once again:
The Wii U Pro Controller is now also supported via Bluetooth.

Categories: Arduino, Bluetooth, TKJ Electronics, USB Tags:
  1. NicoHood
    April 16th, 2015 at 16:35 | #1

    Great! Have not tested it but thanks for the note. I really have no time for USB-Host sadly.
    Once ive finished with my HID-Project and HoodLoader2 I will present a simple Wiiu to USB adapter as ive done with the Gamecube controller.

    But you could also built this yourself. Seems i’ve never posted my project here:
    https://github.com/NicoHood/HID
    https://github.com/NicoHood/HoodLoader2
    https://nicohood.wordpress.com/2015/02/10/diy-gamecube-to-usb-pc-adapter-with-arduino/

  2. April 16th, 2015 at 17:55 | #2

    @NicoHood
    Okay should be pretty straightforward with your enchanted HID functionality! I will properly use it in the near future to emulate the Wii Balance Board.

  3. July 6th, 2015 at 21:37 | #3

    Hello, I’m french.

    Thank you for work and share.
    I want connect a chinese wiimote (http://fr.eachbuyer.com/remote-and-nunchuk-controller-set-for-nintendo-wii-game-p3452.html) on my arduino UNO.

    i use Wii.ino.
    I put 1 button and 2 button together. Wiimote Blue leds flash.
    I start the arduino.
    In the Serie monitor i have : Wiimote Bluetooth Library Started
    and that’s all.

    I was test with 2 differents wiimote.

    Can you help me?

    My Bluetooth dongle (http://www.banggood.com/Wholesale-Super-Mini-Bluetooth-2_0-Adapter-Dongle-Vista-Compatible-p-29703.html) is connected to USB shield V2 (http://www.banggood.com/USB-Host-Shield-Compatible-Google-Android-ADK-Support-UNO-MEGA-p-90129.html)

    USB_desc.ino result is:
    Device descriptor:
    Descriptor Length: 12
    Descriptor type: 01
    USB version: 0110
    Device class: E0
    Device Subclass: 01
    Device Protocol: 01
    Max.packet size: 10
    Vendor ID: 0A12
    Product ID: 0001
    Revision ID: 0134
    Mfg.string index: 00
    Prod.string index: 00
    Serial number index: 00
    Number of conf.: 01

    Configuration descriptor:
    Total length: 006C
    Num.intf: 02
    Conf.value: 01
    Conf.string: 00
    Attr.: 80
    Max.pwr: 32

    Interface descriptor:
    Intf.number: 00
    Alt.: 00
    Endpoints: 03
    Intf. Class: E0
    Intf. Subclass: 01
    Intf. Protocol: 01
    Intf.string: 00

    Endpoint descriptor:
    Endpoint address: 81
    Attr.: 03
    Max.pkt size: 0010
    Polling interval: 01

    Endpoint descriptor:
    Endpoint address: 82
    Attr.: 02
    Max.pkt size: 0040
    Polling interval: 00

    Endpoint descriptor:
    Endpoint address: 02
    Attr.: 02
    Max.pkt size: 0040
    Polling interval: 00

    Interface descriptor:
    Intf.number: 01
    Alt.: 00
    Endpoints: 02
    Intf. Class: E0
    Intf. Subclass: 01
    Intf. Protocol: 01
    Intf.string: 00

    Endpoint descriptor:
    Endpoint address: 83
    Attr.: 01
    Max.pkt size: 0000
    Polling interval: 01

    Endpoint descriptor:
    Endpoint address: 03
    Attr.: 01
    Max.pkt size: 0000
    Polling interval: 01

    Interface descriptor:
    Intf.number: 01
    Alt.: 01
    Endpoints: 02
    Intf. Class: E0
    Intf. Subclass: 01
    Intf. Protocol: 01
    Intf.string: 00

    Endpoint descriptor:
    Endpoint address: 83
    Attr.: 01
    Max.pkt size: 0009
    Polling interval: 01

    Endpoint descriptor:
    Endpoint address: 03
    Attr.: 01
    Max.pkt size: 0009
    Polling interval: 01

    Interface descriptor:
    Intf.number: 01
    Alt.: 02
    Endpoints: 02
    Intf. Class: E0
    Intf. Subclass: 01
    Intf. Protocol: 01
    Intf.string: 00

    Endpoint descriptor:
    Endpoint address: 83
    Attr.: 01
    Max.pkt size: 0011
    Polling interval: 01

    Endpoint descriptor:
    Endpoint address: 03
    Attr.: 01
    Max.pkt size: 0011
    Polling interval: 01

    Addr:1(0.0.1)

  4. July 6th, 2015 at 21:40 | #4
  5. Nickhil
    July 11th, 2015 at 08:54 | #5

    I have been trying for a while now but I’m not able to connect the wiimote to the arduino. I am using the example code, my usb dongle works (tried with a playstation controller and is the recommended one), my reset pin and pin 7 are connected and I do have external power (sparkfun shield). I am using the newest version of the library on github. It wont work for some reason though. I’ve tried both using the pair button and pressing both the 1 and 2 buttons simultaneously. A little confused here.
    -Nick

  6. July 11th, 2015 at 11:03 | #6

    @Nickhil
    Please enable serial debugging: https://github.com/felis/USB_Host_Shield_2.0#enable-debugging and post the output.

  7. Mike
    July 17th, 2015 at 17:11 | #7

    Hi, thanks for your work. I’m having trouble pairing my wiimote to the arduino, I’ve set ENABLE_UHS_DEBUGGING 1 but all I see in the serial monitor is “Wiimote Bluetooth Library Started” and nothing else. My setup is Arduino UNO + Arduino usb host shield + the recommended bt dongles (I have 2) + stock wiimote. I also have a Arduino MEGA to test with. I’ve tested the mouse example and it is working fine, but I can’t get my wiimote to work (or pair at all). Is there something else I gotta setup than just plugging the shield and dongle in and loading the sample program? Thanks a lot

  8. July 18th, 2015 at 21:36 | #8

    @Mike
    Please uncomment this line: https://github.com/felis/USB_Host_Shield_2.0/blob/master/BTD.cpp#L20 and post the output.

Comment pages
1 2 3384
  1. No trackbacks yet.