loading
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!

Step 1: 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


<p>Can you provide new links for the demo files?</p>
<p>how do you get the files to do this at because the mega upload thing didn't work because it was shut down can you make a new file on a different website try mediafire</p>
About step 6: would a glass bowl be suitable for this step?
Yes, I would assume that it would be fine. I would still use a scrap bowl though (certainly not your nice china)
Mega Upload has been shutdown dude, can you upload the files somewhere else, or email/pm them to me? <br>
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?
Yeah, ditto on the &quot;Megaupload got shut down by the FBI so what now?&quot; problem.&nbsp; The <a href="http://arduino.cc/forum/" rel="nofollow">Arduino forums</a> allow up to four attachments (4 MB combined size) per Topic post, so that might be a solid option.&nbsp; Plus you're far less likely to be consorting with federal criminals!
hi,<br>excuse me but i am really a newbee in arduino...<br>i am trying to make this instructable, but when i want to load the sketch i have this error:<br>-------------------------------------------------------------------------------------------------------------------<br>In file included from WiiChuckDemo.cpp:2:<br>/nunchuck_funcs.h:13:22: error: WProgram.h: No such file or directory<br>In file included from WiiChuckDemo.cpp:2:<br>/nunchuck_funcs.h: In function 'void nunchuck_setpowerpins()':<br>nunchuck_funcs.h:24: error: 'delay' was not declared in this scope<br>/nunchuck_funcs.h: In function 'void nunchuck_init()':<br>nunchuck_funcs.h:33: error: 'class TwoWire' has no member named 'send'<br><br>As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.<br><br>nunchuck_funcs.h:34: error: 'class TwoWire' has no member named 'send'<br><br>As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.<br><br>/nunchuck_funcs.h: In function 'void nunchuck_send_request()':<br>nunchuck_funcs.h:43: error: 'class TwoWire' has no member named 'send'<br><br>As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.<br><br>/nunchuck_funcs.h: In function 'int nunchuck_get_data()':<br>nunchuck_funcs.h:63: error: 'class TwoWire' has no member named 'receive'<br><br>As of Arduino 1.0, the Wire.receive() function was renamed to Wire.read() for consistency with other libraries.<br><br>/nunchuck_funcs.h: In function 'void nunchuck_print_data()':<br>nunchuck_funcs.h:114: error: 'Serial' was not declared in this scope<br><br>//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br>i also tested various sketches from other instructables and i always have errors !<br>with the included libraries i have no problem !!!<br>what is it happening ?<br>please help me !<br>PS:<br>i have the Arduino Mega Atmega1280 and use Arduino V1.0
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<br>thanks for answering that quick !<br>so it is due to the V1 ?!? <br>i was searching the Arduino 22, but i cant find it ! could you please send me that version by mail please? <br>tha would be very friendly...<br>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.
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, <br>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.<br>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...<br>have tryed to send only the pde, then i try to send pde and h files and nothing... disapointed ! :( <br>i think i'll wait you V1 version !<br>thanks
hy again,<br>now i placed the folder in C:\Documents and Settings\mich\My documents\Arduino\<br>i open the .ino i converted before, start loading and now:<br>----------------------------------------------------------------------------------------------------------------------<br>In file included from WiiChuckDemo.cpp:2:<br>/nunchuck_funcs.h:13:22: error: WProgram.h: No such file or directory<br>In file included from WiiChuckDemo.cpp:2:<br>/nunchuck_funcs.h: In function 'void nunchuck_setpowerpins()':<br>nunchuck_funcs.h:24: error: 'delay' was not declared in this scope<br>/nunchuck_funcs.h: In function 'void nunchuck_init()':<br>nunchuck_funcs.h:33: error: 'class TwoWire' has no member named 'send'<br><br>As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.<br><br>nunchuck_funcs.h:34: error: 'class TwoWire' has no member named 'send'<br><br>As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.<br><br>/nunchuck_funcs.h: In function 'void nunchuck_send_request()':<br>nunchuck_funcs.h:43: error: 'class TwoWire' has no member named 'send'<br><br>As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.<br><br>/nunchuck_funcs.h: In function 'int nunchuck_get_data()':<br>nunchuck_funcs.h:63: error: 'class TwoWire' has no member named 'receive'<br><br>As of Arduino 1.0, the Wire.receive() function was renamed to Wire.read() for consistency with other libraries.<br><br>/nunchuck_funcs.h: In function 'void nunchuck_print_data()':<br>nunchuck_funcs.h:114: error: 'Serial' was not declared in this scope<br>In file included from WiiChuckDemo.cpp:105:<br>/nunchuck_funcs.h: At global scope:<br>nunchuck_funcs.h:14: error: redefinition of 'uint8_t nunchuck_buf [6]'<br>nunchuck_funcs.h:14: error: 'uint8_t nunchuck_buf [6]' previously declared here<br>/nunchuck_funcs.h: In function 'void nunchuck_setpowerpins()':<br>nunchuck_funcs.h:17: error: redefinition of 'void nunchuck_setpowerpins()'<br>nunchuck_funcs.h:17: error: 'void nunchuck_setpowerpins()' previously defined here<br>/nunchuck_funcs.h: In function 'void nunchuck_init()':<br>nunchuck_funcs.h:29: error: redefinition of 'void nunchuck_init()'<br>nunchuck_funcs.h:29: error: 'void nunchuck_init()' previously defined here<br>nunchuck_funcs.h:33: error: 'class TwoWire' has no member named 'send'<br><br>As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.<br><br>nunchuck_funcs.h:34: error: 'class TwoWire' has no member named 'send'<br><br>As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.<br><br>/nunchuck_funcs.h: In function 'void nunchuck_send_request()':<br>nunchuck_funcs.h:40: error: redefinition of 'void nunchuck_send_request()'<br>nunchuck_funcs.h:40: error: 'void nunchuck_send_request()' previously defined here<br>nunchuck_funcs.h:43: error: 'class TwoWire' has no member named 'send'<br><br>As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.<br><br>/nunchuck_funcs.h: In function 'char nunchuk_decode_byte(char)':<br>nunchuck_funcs.h:49: error: redefinition of 'char nunchuk_decode_byte(char)'<br>nunchuck_funcs.h:49: error: 'char nunchuk_decode_byte(char)' previously defined here<br>/nunchuck_funcs.h: In function 'int nunchuck_get_data()':<br>nunchuck_funcs.h:57: error: redefinition of 'int nunchuck_get_data()'<br>nunchuck_funcs.h:57: error: 'int nunchuck_get_data()' previously defined here<br>nunchuck_funcs.h:63: error: 'class TwoWire' has no member named 'receive'<br><br>As of Arduino 1.0, the Wire.receive() function was renamed to Wire.read() for consistency with other libraries.<br><br>/nunchuck_funcs.h: In function 'void nunchuck_print_data()':<br>nunchuck_funcs.h:79: error: redefinition of 'void nunchuck_print_data()'<br>nunchuck_funcs.h:79: error: 'void nunchuck_print_data()' previously defined here<br>/nunchuck_funcs.h: In function 'int nunchuck_zbutton()':<br>nunchuck_funcs.h:141: error: redefinition of 'int nunchuck_zbutton()'<br>nunchuck_funcs.h:141: error: 'int nunchuck_zbutton()' previously defined here<br>/nunchuck_funcs.h: In function 'int nunchuck_cbutton()':<br>nunchuck_funcs.h:147: error: redefinition of 'int nunchuck_cbutton()'<br>nunchuck_funcs.h:147: error: 'int nunchuck_cbutton()' previously defined here<br>/nunchuck_funcs.h: In function 'int nunchuck_joyx()':<br>nunchuck_funcs.h:153: error: redefinition of 'int nunchuck_joyx()'<br>nunchuck_funcs.h:153: error: 'int nunchuck_joyx()' previously defined here<br>/nunchuck_funcs.h: In function 'int nunchuck_joyy()':<br>nunchuck_funcs.h:159: error: redefinition of 'int nunchuck_joyy()'<br>nunchuck_funcs.h:159: error: 'int nunchuck_joyy()' previously defined here<br>/nunchuck_funcs.h: In function 'int nunchuck_accelx()':<br>nunchuck_funcs.h:165: error: redefinition of 'int nunchuck_accelx()'<br>nunchuck_funcs.h:165: error: 'int nunchuck_accelx()' previously defined here<br>/nunchuck_funcs.h: In function 'int nunchuck_accely()':<br>nunchuck_funcs.h:171: error: redefinition of 'int nunchuck_accely()'<br>nunchuck_funcs.h:171: error: 'int nunchuck_accely()' previously defined here<br>/nunchuck_funcs.h: In function 'int nunchuck_accelz()':<br>nunchuck_funcs.h:177: error: redefinition of 'int nunchuck_accelz()'<br>nunchuck_funcs.h:177: error: 'int nunchuck_accelz()' previously defined here<br>WiiChuckDemo.cpp: At global scope:<br>WiichuckDemo:3: error: redefinition of 'int loop_cnt'<br>WiichuckDemo.pde:-1: error: 'int loop_cnt' previously defined here<br>WiichuckDemo:5: error: redefinition of 'byte accx'<br>WiichuckDemo.pde:-1: error: 'byte accx' previously declared here<br>WiichuckDemo:5: error: redefinition of 'byte accy'<br>WiichuckDemo.pde:-1: error: 'byte accy' previously declared here<br>WiichuckDemo:5: error: redefinition of 'byte accz'<br>WiichuckDemo.pde:-1: error: 'byte accz' previously declared here<br>WiichuckDemo:5: error: redefinition of 'byte joyx'<br>WiichuckDemo.pde:-1: error: 'byte joyx' previously declared here<br>WiichuckDemo:5: error: redefinition of 'byte joyy'<br>WiichuckDemo.pde:-1: error: 'byte joyy' previously declared here<br>WiichuckDemo:5: error: redefinition of 'byte zbut'<br>WiichuckDemo.pde:-1: error: 'byte zbut' previously declared here<br>WiichuckDemo:5: error: redefinition of 'byte cbut'<br>WiichuckDemo.pde:-1: error: 'byte cbut' previously declared here<br>WiichuckDemo:6: error: redefinition of 'int ledPin'<br>WiichuckDemo.pde:-1: error: 'int ledPin' previously defined here<br>WiichuckDemo:7: error: redefinition of 'int Lledpin'<br>WiichuckDemo.pde:-1: error: 'int Lledpin' previously defined here<br>WiichuckDemo:8: error: redefinition of 'int Rledpin'<br>WiichuckDemo.pde:-1: error: 'int Rledpin' previously defined here<br>WiichuckDemo:9: error: redefinition of 'int Uledpin'<br>WiichuckDemo.pde:-1: error: 'int Uledpin' previously defined here<br>WiichuckDemo:10: error: redefinition of 'int Dledpin'<br>WiichuckDemo.pde:-1: error: 'int Dledpin' previously defined here<br>WiiChuckDemo.cpp: In function 'void setup()':<br>WiichuckDemo:13: error: redefinition of 'void setup()'<br>WiichuckDemo.pde:-1: error: 'void setup()' previously defined here<br>WiiChuckDemo.cpp: In function 'void loop()':<br>WiichuckDemo:22: error: redefinition of 'void loop()'<br>WiichuckDemo.pde:-1: error: 'void loop()' previously defined here<br>----------------------------------------------------------------------------------------------------------------------<br>another type of error... i don't understand...
hello again, <br>i placed the .pde and the .h files to: libraries\Servo\examples\WiiChuckDemo<br>then i renamed .pde to .ino<br>i restart loading and now here is the error:<br>----------------------------------------------------------------------------------------------------------------------<br>sketch_jan01a.cpp:3:28: error: nunchuck_funcs.h: No such file or directory<br>sketch_jan01a.cpp: In function 'void setup()':<br>WiichuckDemo:16: error: 'nunchuck_setpowerpins' was not declared in this scope<br>WiichuckDemo:17: error: 'nunchuck_init' was not declared in this scope<br>sketch_jan01a.cpp: In function 'void loop()':<br>WiichuckDemo:27: error: 'nunchuck_get_data' was not declared in this scope<br>WiichuckDemo:29: error: 'nunchuck_accelx' was not declared in this scope<br>WiichuckDemo:30: error: 'nunchuck_accely' was not declared in this scope<br>WiichuckDemo:31: error: 'nunchuck_accelz' was not declared in this scope<br>WiichuckDemo:32: error: 'nunchuck_joyx' was not declared in this scope<br>WiichuckDemo:33: error: 'nunchuck_joyy' was not declared in this scope<br>WiichuckDemo:34: error: 'nunchuck_zbutton' was not declared in this scope<br>WiichuckDemo:35: error: 'nunchuck_cbutton' was not declared in this scope<br>-------------------------------------------------------------------------------------------------------------------<br>it looks like no finding the.h file ...<br>what i am doing wrong ?<br>please help !<br>thank you in advance.
Did you mean to put a video link up there ^?<br><br>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 :)
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<br><br><br>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<br><br>thanks
Accz most likely is the acceleration in the z axis or up and down.
There is a much simpler way to do in Arduinolog's blog:<br> <br> <a href="http://goo.gl/ccf2P">http://goo.gl/ccf2P</a><br> <br> 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.<br> <br> In the Arduinolog's version, he used a 90 degree header pin leaving the anlog pins free to use.<br> <br> Worths a look!<br> <br> Cheers.
so what exactly does this thing do
what is an arduino?<br>
It's a programmable IC board with digital I/O and analog I/O. for more information check this out.<a href="http://www.arduino.cc/">http://www.arduino.cc/</a>
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.<br /> <br /> http://www.hvwtech.com/products_view.asp?ProductID=1081<br />
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.
Thank you!<br /> (your sense of humor highly appreciated :)<br />
&nbsp;A simpilar and cheaper way of doing this would be to plug in wire into the little notches at the end of the&nbsp;connector. The&nbsp;connector&nbsp;pins are like this.Look for wiichuck they have a library. Nc and Att are not used.<br /> Clk &nbsp; &nbsp;NC &nbsp;Gnd<br /> __---__---__<br /> __---__---__<br /> Pwr &nbsp;Att &nbsp; &nbsp;Dat
&nbsp;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?&nbsp;
dany32412's sketch doesn't set the pinMode of the LED&nbsp;pins, which sounds like the problem you're seeing.&nbsp; Add:<br /> &nbsp; pinMode(Lledpin, OUTPUT);<br /> &nbsp; pinMode(Rledpin, OUTPUT);<br /> &nbsp; pinMode(Uledpin, OUTPUT);<br /> &nbsp; pinMode(Dledpin, OUTPUT);<br /> anywhere in the &quot;setup()&quot; function and see if it makes a difference.<br /> <br /> Also,&nbsp;I&nbsp;see no current-limiting resistors in his circuit.&nbsp; 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)&nbsp; Be sure to add a 220 ohm resistor in series with each LED.<br /> <br /> And thank you RazorConcepts and JohnPark for the clarifications.&nbsp; <a href="http://store.fungizmos.com/index.php?main_page=product_info&amp;cPath=69&amp;products_id=212">FunGizmos.com</a> does indeed stock my Wiichuck adapter for $4, and that includes the 4-pos pin header needed and free domestic shipping.<br />
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!&nbsp;<br />
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... <br /> <br /> Right now I'm working on a project for school, I'm making a Nunchuck/Arduino controlled mechanic arm, it has 3 DC&nbsp;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.&nbsp;<br /> <br /> Thanks to everyone! :D&nbsp;We'll be in touch.<br />
great im happy that worked out for you. that would awesome if you could post a video.<br />
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.<br />
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&nbsp;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?&nbsp;I'll try it and see if it makes any difference.<br />
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<br />
&nbsp;super!<br /> and I loved the comments on the pixes :-))
Original idea:<br /> http://todbot.com/blog/2008/02/18/wiichuck-wii-nunchuck-adapter-available/<br /> <br /> You can pick one up for like 3 bucks, they work nicely.
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<br />
Also check out Fungizmos, they ship them for free, so it's just $4. http://store.fungizmos.com/index.php?main_page=product_info&amp;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!<br />
True that, the only reason I&nbsp;even bought one because I was already making an order at SparkFun!
Nice and detailed post.&nbsp; I was wondering whether you could post the PCB traces in some sort of image file (pdf, jpeg or similar)?&nbsp; It would be a lot easier than installing a whole PCB design suite I won't use again.<br /> <br /> Thanks<br />
<span style="font-family: monospace;">I Have Put a PDF copy on my blog <a href="http://icecreamterror.wordpress.com/">http://icecreamterror.wordpress.com/</a> <br /> </span>
how thanks that was awesome of you ill add it to the instructables<br />
hmm i suppose but then it would be hard to print it all to scale with what ever program you choose to use, which is why you use diptrace. it does it all for you!<br /> thanks for the positive comment<br />
the download link doesn' work for me, is there any chance you could pst the file in the instructable?<br />
NM<br />
Any chance of the PCB layout in a image form like PDF, for all the Mac users? <br /> <br /> <br /> Just a scan of your A4 print out would do the job, as then the scale is kept at A4.<br /> <br /> But really nice work (no way id pay $13 for a tiny PCB, the best thing about arduino is that is OPEN source.) <br />

About This Instructable

92,355 views

221 favorites

License:

More by dany32412: NES in a Cartridge Homemade Notebook Dividers Arduino Christmas Light Controller
Tags: Arduino + wii chuck
Add instructable to: