Connect the Wii Nunchuck Breakout Adapter as shown below using the STEMMA QT connector or a solderless breadboard.

  • Connect board VIN (red wire) to Arduino 5V if you are running a 5V board Arduino (Uno, etc.). If your board is 3V, connect to that instead.
  • Connect board GND (black wire) to Arduino GND
  • Connect board SCL (yellow wire) to Arduino SCL
  • Connect board SDA (blue wire) to Arduino SDA

There are existing Arduino libraries you can use with the Wii series of devices. We'll be using the popular WiiChuck library which has support for the following devices

  • Nunchuk
  • Classic Controller
  • Guitar Hero Guitar
  • Guitar Hero Drums
  • DJ Hero
  • Drawesome Tablet
  • Taiko Drums

Install it by searching the Arduino Library Manager for WiiChuck

The WiiChuck library is very fully featured, using a lot of RAM and Flash and we don't recommend it for use with Arduino compatibles that use ATmega32x's like the UNO/Leonardo/32u4 because its easy to overuse the memory and go unstable. Please pick a board with over 4K of RAM!

You can use this sketch, again it barely fits on a 32u4 or 328 Arduino but it will connect and display data from a Nunchuk type controller!

#include <WiiChuck.h>

Accessory nunchuck;

void setup() {
	Serial.begin(115200);
	nunchuck.begin();
	if (nunchuck.type == Unknown) {
		nunchuck.type = NUNCHUCK;
	}
}

void loop() {
  nunchuck.readData();    // Read inputs and update maps

  Serial.print("X: "); Serial.print(nunchuck.getAccelX());
  Serial.print(" \tY: "); Serial.print(nunchuck.getAccelY()); 
  Serial.print(" \tZ: "); Serial.println(nunchuck.getAccelZ()); 

  Serial.print("Joy: ("); 
  Serial.print(nunchuck.getJoyX());
  Serial.print(", "); 
  Serial.print(nunchuck.getJoyY());
  Serial.println(")");

  Serial.print("Button: "); 
  if (nunchuck.getButtonZ()) Serial.print(" Z "); 
  if (nunchuck.getButtonC()) Serial.print(" C "); 

  Serial.println();
  delay(100);
}

Open the serial console at 115200 baud to see data streaming out, you can see the X Y Z accelerometer data (ranges from 0 to 1023), X and Y from the thumbstick (ranges from 0-255, with ~127 in the center position), and the two trigger buttons Z and C

This guide was first published on Jan 10, 2021. It was last updated on Jan 10, 2021.

This page (Arduino Use) was last updated on Oct 15, 2021.

Text editor powered by tinymce.