Instructables
Picture of Wii Nunchuck Adapter
DSCF2148.jpg
DSCF2149.jpg
This tutorial is for all those people who have an arduino and want to use there Wii nunchuck as an input device, but dont realy feel like cutting open the cord and ruining the nunchuck FOREVER!!!!!!!!

well youve come to the right place!
 
Remove these adsRemove these ads by Signing Up

Step 1: Supplies

Picture of Supplies
These are the supplies you will need
most can be found at radioshack and at hardware stores.
if you cant find any etchant solution i made my own on STEP 6.
+ iron
+scisors
+tape
+soft gloss photo paper
+arduino
+wii nunchuck
+LED's
+brake cleaner
+etchant solution (is makeable, see step 6)
+double sided PCB .062" thick (you do have a bit of lee way)
+solder
+hack saw


Step 2: Printing our transfers

Thanks to icecreamterror who made a pdf version of the pcb heres a link
http://www.mediafire.com/view/?h81q6efr03sw326

For those of you who want to do it old school style...
start by downloading DipTrace
http://www.diptrace.com/download.php
and the Wii Nunchuck layout
http://www.megaupload.com/?d=0212FN11
1. install diptrace by following all the on screen instructions
2. Start Diptrace
3. go to file>open and locate "wii_nun_chuck_adapter.dip" (image 2)
4. click open
5. go to view> click mirror (so it is checked)
6. now it should look like image 3
7. Load a piece of photo soft gloss paper into your printer (image 4)
8. now go to file>print> and select your laser printer (image 5)
9. press PRINT.
10. now you should have a nice looking transfer.
WOOO HOOOO we are almost there. sorta

Step 3: Preping the transfer

1) no that you have your printed sheet of PCB transfer. pick one and cut it out like i have in image 1.
2) Now what we want to do is fold the paper so the two sides line up. you can use a light to help you look through the paper.
3) once its lined up make a nice clean crease. (image 2)
4) now we use some tape to make sort of a tube that the PCB will slide into. (image 3)
5) the transfer is ready
next step is to cut and prep the board.
1-40 of 53Next »
About step 6: would a glass bowl be suitable for this step?
dany32412 (author)  GenesisMaster1 year ago
Yes, I would assume that it would be fine. I would still use a scrap bowl though (certainly not your nice china)
lug big lug2 years ago
Mega Upload has been shutdown dude, can you upload the files somewhere else, or email/pm them to me?
jrast3622 years ago
i think that the whole idea behind this could be very useful but now that megaupload is down i cant get the two files. Is there any way i can get them?
berq jrast3622 years ago
Yeah, ditto on the "Megaupload got shut down by the FBI so what now?" problem.  The Arduino forums allow up to four attachments (4 MB combined size) per Topic post, so that might be a solid option.  Plus you're far less likely to be consorting with federal criminals!
redsunmtm2 years ago
hi,
excuse me but i am really a newbee in arduino...
i am trying to make this instructable, but when i want to load the sketch i have this error:
-------------------------------------------------------------------------------------------------------------------
In file included from WiiChuckDemo.cpp:2:
/nunchuck_funcs.h:13:22: error: WProgram.h: No such file or directory
In file included from WiiChuckDemo.cpp:2:
/nunchuck_funcs.h: In function 'void nunchuck_setpowerpins()':
nunchuck_funcs.h:24: error: 'delay' was not declared in this scope
/nunchuck_funcs.h: In function 'void nunchuck_init()':
nunchuck_funcs.h:33: error: 'class TwoWire' has no member named 'send'

As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.

nunchuck_funcs.h:34: error: 'class TwoWire' has no member named 'send'

As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.

/nunchuck_funcs.h: In function 'void nunchuck_send_request()':
nunchuck_funcs.h:43: error: 'class TwoWire' has no member named 'send'

As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.

/nunchuck_funcs.h: In function 'int nunchuck_get_data()':
nunchuck_funcs.h:63: error: 'class TwoWire' has no member named 'receive'

As of Arduino 1.0, the Wire.receive() function was renamed to Wire.read() for consistency with other libraries.

/nunchuck_funcs.h: In function 'void nunchuck_print_data()':
nunchuck_funcs.h:114: error: 'Serial' was not declared in this scope

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
i also tested various sketches from other instructables and i always have errors !
with the included libraries i have no problem !!!
what is it happening ?
please help me !
PS:
i have the Arduino Mega Atmega1280 and use Arduino V1.0
dany32412 (author)  redsunmtm2 years ago
Sorry i didnt reply earlier. Yeah i hate that new arduino 1.0, there's too many changes. All my libaries from before don't work on it. I'm just using Arduino 22 until they male some changes. See if it works with that
hello and happy new year
thanks for answering that quick !
so it is due to the V1 ?!?
i was searching the Arduino 22, but i cant find it ! could you please send me that version by mail please?
tha would be very friendly...
regards
it is ok i found at arduino's, i was searching in google arduino 22 and couldn't find nothing, but went to site and voila, thank you, i am going to get 0022 and 0023 to see, thanks again.
dany32412 (author)  redsunmtm2 years ago
Im glad you found everything. Version 22 and 23 should work, but i'm currently working on getting the library to work with Arduino V1. Hopefully ill post that soon
hy,
yes i found them, but nothing works, i mean, the sketches seem to install correctly, but nothing happens, only sometimes the led 13 keeping alive and my up and left led staying lighting with no change from nunchuck.
the leds are new, the nunchuk too and even better i cutted the cable to connect directly on the board, so no false contact... but nothing...
have tryed to send only the pde, then i try to send pde and h files and nothing... disapointed ! :(
i think i'll wait you V1 version !
thanks
redsunmtm2 years ago
hy again,
now i placed the folder in C:\Documents and Settings\mich\My documents\Arduino\
i open the .ino i converted before, start loading and now:
----------------------------------------------------------------------------------------------------------------------
In file included from WiiChuckDemo.cpp:2:
/nunchuck_funcs.h:13:22: error: WProgram.h: No such file or directory
In file included from WiiChuckDemo.cpp:2:
/nunchuck_funcs.h: In function 'void nunchuck_setpowerpins()':
nunchuck_funcs.h:24: error: 'delay' was not declared in this scope
/nunchuck_funcs.h: In function 'void nunchuck_init()':
nunchuck_funcs.h:33: error: 'class TwoWire' has no member named 'send'

As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.

nunchuck_funcs.h:34: error: 'class TwoWire' has no member named 'send'

As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.

/nunchuck_funcs.h: In function 'void nunchuck_send_request()':
nunchuck_funcs.h:43: error: 'class TwoWire' has no member named 'send'

As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.

/nunchuck_funcs.h: In function 'int nunchuck_get_data()':
nunchuck_funcs.h:63: error: 'class TwoWire' has no member named 'receive'

As of Arduino 1.0, the Wire.receive() function was renamed to Wire.read() for consistency with other libraries.

/nunchuck_funcs.h: In function 'void nunchuck_print_data()':
nunchuck_funcs.h:114: error: 'Serial' was not declared in this scope
In file included from WiiChuckDemo.cpp:105:
/nunchuck_funcs.h: At global scope:
nunchuck_funcs.h:14: error: redefinition of 'uint8_t nunchuck_buf [6]'
nunchuck_funcs.h:14: error: 'uint8_t nunchuck_buf [6]' previously declared here
/nunchuck_funcs.h: In function 'void nunchuck_setpowerpins()':
nunchuck_funcs.h:17: error: redefinition of 'void nunchuck_setpowerpins()'
nunchuck_funcs.h:17: error: 'void nunchuck_setpowerpins()' previously defined here
/nunchuck_funcs.h: In function 'void nunchuck_init()':
nunchuck_funcs.h:29: error: redefinition of 'void nunchuck_init()'
nunchuck_funcs.h:29: error: 'void nunchuck_init()' previously defined here
nunchuck_funcs.h:33: error: 'class TwoWire' has no member named 'send'

As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.

nunchuck_funcs.h:34: error: 'class TwoWire' has no member named 'send'

As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.

/nunchuck_funcs.h: In function 'void nunchuck_send_request()':
nunchuck_funcs.h:40: error: redefinition of 'void nunchuck_send_request()'
nunchuck_funcs.h:40: error: 'void nunchuck_send_request()' previously defined here
nunchuck_funcs.h:43: error: 'class TwoWire' has no member named 'send'

As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.

/nunchuck_funcs.h: In function 'char nunchuk_decode_byte(char)':
nunchuck_funcs.h:49: error: redefinition of 'char nunchuk_decode_byte(char)'
nunchuck_funcs.h:49: error: 'char nunchuk_decode_byte(char)' previously defined here
/nunchuck_funcs.h: In function 'int nunchuck_get_data()':
nunchuck_funcs.h:57: error: redefinition of 'int nunchuck_get_data()'
nunchuck_funcs.h:57: error: 'int nunchuck_get_data()' previously defined here
nunchuck_funcs.h:63: error: 'class TwoWire' has no member named 'receive'

As of Arduino 1.0, the Wire.receive() function was renamed to Wire.read() for consistency with other libraries.

/nunchuck_funcs.h: In function 'void nunchuck_print_data()':
nunchuck_funcs.h:79: error: redefinition of 'void nunchuck_print_data()'
nunchuck_funcs.h:79: error: 'void nunchuck_print_data()' previously defined here
/nunchuck_funcs.h: In function 'int nunchuck_zbutton()':
nunchuck_funcs.h:141: error: redefinition of 'int nunchuck_zbutton()'
nunchuck_funcs.h:141: error: 'int nunchuck_zbutton()' previously defined here
/nunchuck_funcs.h: In function 'int nunchuck_cbutton()':
nunchuck_funcs.h:147: error: redefinition of 'int nunchuck_cbutton()'
nunchuck_funcs.h:147: error: 'int nunchuck_cbutton()' previously defined here
/nunchuck_funcs.h: In function 'int nunchuck_joyx()':
nunchuck_funcs.h:153: error: redefinition of 'int nunchuck_joyx()'
nunchuck_funcs.h:153: error: 'int nunchuck_joyx()' previously defined here
/nunchuck_funcs.h: In function 'int nunchuck_joyy()':
nunchuck_funcs.h:159: error: redefinition of 'int nunchuck_joyy()'
nunchuck_funcs.h:159: error: 'int nunchuck_joyy()' previously defined here
/nunchuck_funcs.h: In function 'int nunchuck_accelx()':
nunchuck_funcs.h:165: error: redefinition of 'int nunchuck_accelx()'
nunchuck_funcs.h:165: error: 'int nunchuck_accelx()' previously defined here
/nunchuck_funcs.h: In function 'int nunchuck_accely()':
nunchuck_funcs.h:171: error: redefinition of 'int nunchuck_accely()'
nunchuck_funcs.h:171: error: 'int nunchuck_accely()' previously defined here
/nunchuck_funcs.h: In function 'int nunchuck_accelz()':
nunchuck_funcs.h:177: error: redefinition of 'int nunchuck_accelz()'
nunchuck_funcs.h:177: error: 'int nunchuck_accelz()' previously defined here
WiiChuckDemo.cpp: At global scope:
WiichuckDemo:3: error: redefinition of 'int loop_cnt'
WiichuckDemo.pde:-1: error: 'int loop_cnt' previously defined here
WiichuckDemo:5: error: redefinition of 'byte accx'
WiichuckDemo.pde:-1: error: 'byte accx' previously declared here
WiichuckDemo:5: error: redefinition of 'byte accy'
WiichuckDemo.pde:-1: error: 'byte accy' previously declared here
WiichuckDemo:5: error: redefinition of 'byte accz'
WiichuckDemo.pde:-1: error: 'byte accz' previously declared here
WiichuckDemo:5: error: redefinition of 'byte joyx'
WiichuckDemo.pde:-1: error: 'byte joyx' previously declared here
WiichuckDemo:5: error: redefinition of 'byte joyy'
WiichuckDemo.pde:-1: error: 'byte joyy' previously declared here
WiichuckDemo:5: error: redefinition of 'byte zbut'
WiichuckDemo.pde:-1: error: 'byte zbut' previously declared here
WiichuckDemo:5: error: redefinition of 'byte cbut'
WiichuckDemo.pde:-1: error: 'byte cbut' previously declared here
WiichuckDemo:6: error: redefinition of 'int ledPin'
WiichuckDemo.pde:-1: error: 'int ledPin' previously defined here
WiichuckDemo:7: error: redefinition of 'int Lledpin'
WiichuckDemo.pde:-1: error: 'int Lledpin' previously defined here
WiichuckDemo:8: error: redefinition of 'int Rledpin'
WiichuckDemo.pde:-1: error: 'int Rledpin' previously defined here
WiichuckDemo:9: error: redefinition of 'int Uledpin'
WiichuckDemo.pde:-1: error: 'int Uledpin' previously defined here
WiichuckDemo:10: error: redefinition of 'int Dledpin'
WiichuckDemo.pde:-1: error: 'int Dledpin' previously defined here
WiiChuckDemo.cpp: In function 'void setup()':
WiichuckDemo:13: error: redefinition of 'void setup()'
WiichuckDemo.pde:-1: error: 'void setup()' previously defined here
WiiChuckDemo.cpp: In function 'void loop()':
WiichuckDemo:22: error: redefinition of 'void loop()'
WiichuckDemo.pde:-1: error: 'void loop()' previously defined here
----------------------------------------------------------------------------------------------------------------------
another type of error... i don't understand...
redsunmtm2 years ago
hello again,
i placed the .pde and the .h files to: libraries\Servo\examples\WiiChuckDemo
then i renamed .pde to .ino
i restart loading and now here is the error:
----------------------------------------------------------------------------------------------------------------------
sketch_jan01a.cpp:3:28: error: nunchuck_funcs.h: No such file or directory
sketch_jan01a.cpp: In function 'void setup()':
WiichuckDemo:16: error: 'nunchuck_setpowerpins' was not declared in this scope
WiichuckDemo:17: error: 'nunchuck_init' was not declared in this scope
sketch_jan01a.cpp: In function 'void loop()':
WiichuckDemo:27: error: 'nunchuck_get_data' was not declared in this scope
WiichuckDemo:29: error: 'nunchuck_accelx' was not declared in this scope
WiichuckDemo:30: error: 'nunchuck_accely' was not declared in this scope
WiichuckDemo:31: error: 'nunchuck_accelz' was not declared in this scope
WiichuckDemo:32: error: 'nunchuck_joyx' was not declared in this scope
WiichuckDemo:33: error: 'nunchuck_joyy' was not declared in this scope
WiichuckDemo:34: error: 'nunchuck_zbutton' was not declared in this scope
WiichuckDemo:35: error: 'nunchuck_cbutton' was not declared in this scope
-------------------------------------------------------------------------------------------------------------------
it looks like no finding the.h file ...
what i am doing wrong ?
please help !
thank you in advance.
jrh0652 years ago
Did you mean to put a video link up there ^?

Also, good 'ible! Especially step 6.
Excuse me for being ignorant, but what exactly is the point of this?
It is so that one can use a Wii nunchuck with one's arduino without having to cut/ damage/ modify the original cable, which make the nunchuck useless for its intended purpose.
Ah, thank u :)
wfelix3 years ago
maybe it is a dumb question... I tested, works fine(only with original nunchuck... a spare chinese one fails-works on wii)... I understand how its works :D


understand joyy, joyx, accy and accx... but I can't understand accz... what kind of move change accz value? I shake the nunchuk, the value changes, but i cant understand exactly which move change this value

thanks
Modarius wfelix3 years ago
Accz most likely is the acceleration in the z axis or up and down.
snub3 years ago
There is a much simpler way to do in Arduinolog's blog:

http://goo.gl/ccf2P

You can skip the computer part and draw the circuit with a sharpie saving you some good time. Besides, this version uses a straight header pins which causes you to lose an extra analog pin due to the board size.

In the Arduinolog's version, he used a 90 degree header pin leaving the anlog pins free to use.

Worths a look!

Cheers.
s8jljohnson3 years ago
so what exactly does this thing do
salmones4 years ago
what is an arduino?
sko56 salmones4 years ago
It's a programmable IC board with digital I/O and analog I/O. for more information check this out.http://www.arduino.cc/
Solarbotics4 years ago
These are cool - our intern Jerome developed a version too. It has notches for the locking tabs, and a pass through so we can play with our BlinkM at the same time on the same port.

http://www.hvwtech.com/products_view.asp?ProductID=1081
Solarbotics: Any chance you could open source the layout for your design? I'd like to re-use your awesome connector including the locking tabs in a larger open-source hardware project, but couldn't track down your layout files. Thanks!
Can do - gimme a few to compile and upload them to the website.
keler4 years ago
Thank you!
(your sense of humor highly appreciated :)
Jonas4124 years ago
 A simpilar and cheaper way of doing this would be to plug in wire into the little notches at the end of the connector. The connector pins are like this.Look for wiichuck they have a library. Nc and Att are not used.
Clk    NC  Gnd
__---__---__
__---__---__
Pwr  Att    Dat
 Hey guys, I have a little problem, I guess someone may be able to help me. I followed all the instructions and used the same code, but when I try it, the LED's connected to the digital output pins barely light on... It doesn't happen with any other programs,, any ideas? 
dany32412's sketch doesn't set the pinMode of the LED pins, which sounds like the problem you're seeing.  Add:
  pinMode(Lledpin, OUTPUT);
  pinMode(Rledpin, OUTPUT);
  pinMode(Uledpin, OUTPUT);
  pinMode(Dledpin, OUTPUT);
anywhere in the "setup()" function and see if it makes a difference.

Also, I see no current-limiting resistors in his circuit.  Some LEDs work fine without them in certain situations, but most will burn out or have greatly reduced life. (and you might damage your Arduino too)  Be sure to add a 220 ohm resistor in series with each LED.

And thank you RazorConcepts and JohnPark for the clarifications.  FunGizmos.com does indeed stock my Wiichuck adapter for $4, and that includes the 4-pos pin header needed and free domestic shipping.
I hadn't logged in to instructables until right now and this morning I realized what you say about the 'pinMode's. Didn't try it because I was in a rush, but I did use the resistors since the beggining... I'll try setting the pins as outputs right now, because I already tried using a different power supply for the nunchuck and it didn't make a difference. Thanks! 
I tried it and it actually worked, sounds logic... So the code needs to set the pinMode for every output in order to work fine...

Right now I'm working on a project for school, I'm making a Nunchuck/Arduino controlled mechanic arm, it has 3 DC motors for moving the base and 2 parts of the arm and 1 step motor to control the gripper. I might upload my own code, along with a video and pictures of the arm itself, maybe even write an instructable about the whole thing. The code was based on this one but more complex. This is my first time using Arduino and I liked it, I'll see what else comes to mind. 

Thanks to everyone! :D We'll be in touch.
dany32412 (author)  AlexCendejas4 years ago
great im happy that worked out for you. that would awesome if you could post a video.
dany32412 (author)  AlexCendejas4 years ago
are they dim or are they not turning on, cause so do mine im thinking it has something to do with the circuitry in the nunchuck.
They are really really dim, I have to turn off the lights and look at them from above in order to see the difference between being on and off... I can see them turning on and off when I tilt the nunchuck but they're too dim. Have you found any solution? have you tried maybe powering the nunchuck with an external power source? I'll try it and see if it makes any difference.
dany32412 (author)  AlexCendejas4 years ago
yeah probably powering it with and external source would be the answer, no more than 5 volts from what i understand thats pushing it. try pluging it into a bread board and connect the 2 data cables the same way but connect 3v to power and gnd to gnd. not sure if that will make a difference cause im not sure of what voltage they have the power set at when it connected directly ontop of the analog header. tell me how that works out
windrago4 years ago
 super!
and I loved the comments on the pixes :-))
Original idea:
http://todbot.com/blog/2008/02/18/wiichuck-wii-nunchuck-adapter-available/

You can pick one up for like 3 bucks, they work nicely.
dany32412 (author)  RazorConcepts5 years ago
yeah, but this is for the people who dont want to pay 10 dollars shipping just for a little tiny pcb board, and it was kinda a learning experience for me and now i make all kinds of pcbs
Also check out Fungizmos, they ship them for free, so it's just $4. http://store.fungizmos.com/index.php?main_page=product_info&products_id=212 (full disclosure, I'm friends with both Tod of ThingM and Will from Fungizmos). I believe in both making your own and buying one; whichever works better for you!
1-40 of 53Next »