“WiiChuck” Wii Nunchuck Adapter Available

Want to hook up a Wii Nunchuck to an Arduino but don’t want to cut up the cord on your Nunchuck? Yeah me too. So I made some of these:

wiichuck_adapter1.jpg

wiichuck_adapter2.jpg

It’s a small PCB that adapts the Wii Nunchuck connector to standard 4-pin header. I call it the “wiichuck adapter”. It plugs directly into the Arduino, no wiring necessary. You can get one too for $4.

Available from the following wonderful shops:
FunGizmos.com. FREE DOMESTIC SHIPPING. International shipping for $1 more.
Little Bird Electronics (Australia)
SparkFun. Ships domestic & internationally. Be sure to order header pins too!
– and just about any SparkFun distributor

One of the coolest things about the Wii (to me) is that the expansion port on the bottom of the Wii remote is an I2C serial connection. This means that anything that plugs into that port can work with microcontrollers like the Arduino or Basic Stamp or others. Of the available peripherals, the Wii Nunchuck is one of the best. It contains a 3-axis accelerometer, a 2-axis joystick, and two buttons. Hooking up a Wii Nunchuck to Arduino is easy and I have class notes describing how to do it. But cutting off the connector of the Nunchuck to get at the wires is a little drastic.

This “wiichuck adapter” let’s you play with the Wii Nunchuck and other Wii remote peripherals without needing you to cut cables. Just plug it into the Wii Nunchuck, then into the Arduino, in to Analog In pins 2,3,4,5. Pins 4&5 are the I2C communication pins and Pins 2&3 can act as the power supply for the Nunchuck.

wiichuck-diag.png

This is what it looks like plugged into the Nunchuck by itself.

wiichuck_adapter3.jpg

Nunchuck and Other I2C Devices (like BlinkM)

You can use other I2C devices at the same time as the Nunchuck. The I2C bus allows for multiple devices. For instance, if you have a BlinkM and also want to use a Nunchuck, no problem. The pinout of the BlinkM and the wiichuck adpater are the same. Just solder a little 4-pin socket header to the top of the wiichuck adapter.

wiichuck-header.jpg

And then you can plug in a BlinkM right on top.

wiichuck-blinkm.jpg

Software

To make it a little easier to play with the Nunchuck, I made a little Nunchuck library for Arduino and demo:
nunchuck_funcs.h
WiichuckDemo.ino
(Or better yet, check out the github repository for it all zipped up. Just unzip and open the .ino in Arduino)

It is based off the original research done by Chad Philips of Windmeadow Labs. The library uses the Wiring I2C library called “Wire”. This library is built-in to Arduino, as long as you have the latest Arduino development environment (0010 currently). To see another Arduino sketch using this library, you can check out the BlinkMChuck example that’s part of the BlinkM examples.

The library functions are:
nunchuck_setpowerpins() — power up a nunchuck plugged directly into an Arduino on analog pins 2,3,4,5.
nunchuck_init() — init a nunchuck connected to an Arduino
nunchuck_get_data() — get a data packet from the Nunchuck

Then you can get at the data packet using various helper functions like:
nunchuck_accelx() — get X-axis acceleration
nunchuck_zbutton() — get Z-button state
– …and so on, see the header file for a complete list

Nunchuck Information

Wiimote/Extension Controllers/Nunchuk — info page about the Nunchuck on WiiLi (Linux for Wii) site
“Wiimote Accessory Bus” — docs about the Nunchuck’s connector.

Getting One / How to Order

Available from the following wonderful shops:
FunGizmos.com. International shipping for $1 more.
Tinker.it (UK)
Little Bird Electronics (Australia)

Update 20 Feb 2008: Over 200 wiichuck adapters sold to more than 50 people in 5 countries. I still have some available if anyone wants one. To those who ordered up to now, you’ll be getting them in the post in a few days.
Update 29 Feb 2008: Over 300 wiichuck adapters sold and I still have many more left. Get yours if you want one. :-) Anyone that’s ordered before today should receive their adapters via first class post soon. I’ll be unable to mail out any orders for the first week of March.
Update 24 Mar 2008: I still have several left. If you’re in AU, you can also get the adapter kit from Little Bird Electronics.
Update 11 Apr 2008: Updated the nunchuck_funcs.h library to easily work with a nunchuck plugged directly into an Arduino by adding a nunchuck_init_with_power() function (see comments below). Also, I still have several adapter kits for sale.
Update 6 May 2008: All Out! But I’ll be doing another board run in a few days and will update here when I have more available.
Update 8 Jun 2008: FunGizmos.com is now carrying Wiichuck adapters! They also have lots of other cool things, like BlinkMs. :-)
Update 7 Jan 2009: Both FunGizmos.com (US) and Tinker.It(UK) carry the Wiichuck adapter.
Update 31 Mar 2009: Fixed small bug that made it not compile under more recent Arduino, and fixed links. Also: if you’re having problems getting this to work, in the Arduino software, go to the “Boards” menu, switch to a different Arduino board type, compile, then switch back to your type. This forces a recompile of the Arduino I2C/TWI library that sometimes doesn’t get compiled correctly.
Update 18 Feb 2010: Updated API description to note that “nunchuck_init_with_power()” was removed in favor of “nunchuck_setpowerpins(); nunchuck_init();”.
Update 6 Dec 2011: Updated to work with Arduino 1.0 (still works with Arudino 0023 too). Changed download links to github repository.

299 Replies to ““WiiChuck” Wii Nunchuck Adapter Available”

  1. Well shoot the c and the z buttons are looking good in serial monitor using your demo sketch but the accx and accy are not reacting to changes. Faulty nunchuk unit? I dont have a wii to test it on but will try to find one. Or other ideas? Thanks -Frank

  2. Sorry, I forgot to add some more specifics.
    The blinkM, nunchuck adaptor, and nunchuck are inserted into the Arduino analog ports 2,3,4, and 5.
    I might have not installed the libraries that control the BlinkM properly.

  3. Today, I have upgraded my Arduino software to the Arduino 1.0.3.
    One of the problem I face during the compiling is that ‘byte’ keyword is not recognized by the new Uno software.
    Is there any clue to this?

    Thanks.

    Bryan K

  4. Great job – thanks a lot!
    But up till now it is not possible to get it work.
    I use a original nunchuck and a arduino nano at pin 4 & 5.

    At com-port-window I get cryptic signs and in the window in arduino software I only can read “at gnu.io.RXTXPort.sendEvent(xxx)”.

    Please can you help me?

    Thanks a lot
    Thorsten

  5. This works perfectly with the Uno, but the Leonardo can’t really use this as designed because the I2C pins are now digital 2 and 3. (The Uno uses analog 4 and 5) Rather annoying that the Leonardo changed these locations.

  6. I have an Arduino Uno and I have a brand new Wii chuck and a the adapter and I set up the library and opened up the WiiDemo program and it keeps on bugging on me. Sometimes the program doesn’t start and when it does, the values it keeps return is 0 for both accx and accy and the buttons keep returning 1 despite me not touching the controller. Then after spewing all this out, it just stops. Is there something I’m not doing right? I plugged it in exactly like you did. Please help…

  7. Im new to arduino, and i cant get the code to work on it, It kept on coming up with “wire not declared in scope” and several other errors

  8. Basically works! lol
    I’m using a memorex wireless i got from amazon for $10. Problems are pressing the Z button shows both buttons are pressed. Pressing the C button seems to work correctly.
    The accuracy on joyx and joyy arent very good. Im going to try with a pullup on the i2c pins.

  9. Dude, is it possible to hook up a classic controller or a motionplus to one of these? that would be SO FREAKING AWESOME!!!!!1!!!ONE!

  10. I just purchased two of these adaptors a few minutes ago, and then started reading these comments.

    Q) will the adaptors work with an Arduino UNO?

Leave a Reply

Your email address will not be published. Required fields are marked *