Wii Nunchuck

Wii Nunchuck

The Wii Nunchuck is an optional accessory that plugs into the Wiimote for for the Wii games console. It is a small, rugged, hand-held device that contains two buttons, a JoyStick, and a 3 axis accelerometer. While the original is relatively expensive, cheap copies are available for less than $10.

The Nunchuck itself is an I2C peripheral, and needs just 4 wires - GND, VDD (3.3v), SDA and SCL. SDA and SCL just need wiring up to the corresponding I2C pins (of the same I2C port) on your Espruino.

The connector itself is non-standard with 6 pins (the middle two on each side are unused) but can be connected with either a double-sided PCB, a connector from a scrapped Wiimote, a special adaptor PCB (for example from SparkFun), or the connector can just be cut off.

The connector viewed from the end is connected like this:

                  |        |
            GND   |   X  X |  SDA
                   \       |
                    | X  X |
                   /       |
            SCL   |   X  X |   VDD (3.3v)

Once wired up, you can use the Wii nunchuck with just the following - using the wii_nunchuck (About Modules) module:

var wii = require("wii_nunchuck").connect(I2C1);

This will output something like:


Where the values for joy are between -1 and 1, and values for 'acc' are in G (that is, 1 for normal gravity).


This page is auto-generated from GitHub. If you see any mistakes or have suggestions, please let us know.