Introduction: Using WiiChuck Adapter With Arduino
The Nunchuk is a very versatile tool. Contained in it are a 3-axis accelerometer, a two-axis joystick, and two pushbuttons for around $20. And you can even buy a wireless nunchuck to use as a controller! But many don't want to cut off their nunchuck connector. So here is an alternative.
In this Instructable I am going to show you how to connect the Nunchuk to the Arduino via the WiiChuck adapter. There are a couple of steps to this, first, we will hook it up, then we'll download the library and then download the code.
MATERIALS:
1 WiiChuck Adapter
4 Jumper Wires
1 Arduino Board (with USB Cable)
1 Nunchuck
Step 1: Plugging in the WiiChuck
First, open up the WiiChuck and solder 4 wires into the board. If you look closely you will see that the board is labeled, so follow these instructions:
GND to GND (obviuosly
+ to +5V
C to Analog Input pin 5
D to Analog Input pin 4
Then plug in the board with the labels facing the groove on the nunckuck, as shown in the picture.
I soldered the wires going away from the labels, so just make it so the wires are point in the same direction as the groove.
Step 2: Getting the Library
Go here, scroll down to software, and dowload the zip file called Wiichuckdemo.zip. (Note: Look around this page, you'll find a lot of useful information on the WiiChuck.) Unzip the contents and go into the program files of your computer. From their, go the the Arduino IDE folder. Then, do this: libraries -> create a new folder called WiiChuck, and paste the contents of the folder into the new folder. Then open up the Arduino program and go to sketch -> import library -> Arduino. then open up the WiiChuck folder and open the WiiChuckdemo.pde file. Then download it to the board. Remember, the program uses 19200 baud, so when you open the serial monitor to check out the results, change the rate in the serial monitor to 19200. The play around with the buttons and the accelerometer. Here is an exaple picture:
Step 3: Play Around With It
Now, all you need to do is run the program and check it out! This has many applications, including my next project, a WiiChuck blackbox that logs accelerometer data. Please comment and rate, thanks!
5 Comments
5 years ago
I have made the circuit as shown in the diagrams and the Todbot website but I am having trouble getting this to work. When I upload and run the program, I get 255 for acceleration on both axis and 0 for the buttons even when they are pressed. Can you please help me with this? :-\
12 years ago on Step 2
Now the link is there ;)
BTW, the nunchuck works with 3.3V signals, and the arduino with 5V signals, what do you to convert the levels?
Reply 12 years ago on Introduction
Ha I didn't know that! I believe that the nunchuk uses I2C and whether its good for your arduino or not, this thing works for me. The adapter that I used has been used by many and works so I guess I cant really answer your question. Sorry!
12 years ago on Step 2
You say "Go here, scroll down to software", but where is this "here" you mention?
Reply 12 years ago on Step 2
Sorry about that. The hyperlink didnt work. It should be fixed now.