This is an Arduino library that makes it easy to read data from Nintendo extension controllers such as the Wii Nunchuk and Classic Controller.
"Extension controller" is the name given to devices that extend the functionality of the Wiimote, plugging into the expansion port at the bottom of the device. While originally designed for Wiimote accessories, the port and communication protocol is now also being used for the controllers of Nintendo's new line of "Mini" consoles.
Before anything else, you need to connect your controller to the Arduino. The easist way to do this is with a breakout board, which slides in to the extension controller plug and doesn't require dismantaling your controller. I recommend the Nunchucky breakout, which is inexpensive and available at Adafruit.
Controllers require 3.3V power. If you don't have 3.3V power available on your board, you will need to use an external regulator. Using 5V power can result in erratic data and risks damaging your controller. For this reason it's recommended not to use so-called "inline" adapters that attach to the Arduino Uno's analog pins.
The "data" and "clock" lines on the breakout go to the SDA and SCL pins (respectively) on the microcontroller. For the Arduino Uno, these are pins A4 and A5. If you're not using an Uno, look here to find the I²C pins for your Arduino board.
After installing the library, load an example by going to File -> Examples -> NintendoExtensionCtrl
in the Arduino IDE and selecting an example specific to your controller. I recommend the DebugPrint
examples to start, as they give you a nice overview of what data is available for your controller.
Plug in your controller, upload the example to your board, and have fun!
- Nunchuk
- Classic Controller
- Guitar Hero Guitar
- Guitar Hero World Tour Drums
- DJ Hero Turntable
- uDraw Tablet
- Drawsome Tablet
- NES Mini Controller
- SNES Mini Controller
Currently the library supports any extension controller using unencrypted communication. If you'd like to add support for another controller, I've written a short guide that should be helpful.
This library is licensed under the terms of the GNU Lesser General Public License (LGPL), either version 3 of the License, or (at your option) any later version.