Control Your Robot Using a Wii Nunchuck (and an Arduino)

Control Your Robot Using a Wii Nunchuck (and an Arduino)
After wearing myself out playing Wii Boxing I got to thinking wouldn't it be great if I could use this to control my robot, (looking to my left hand).

Looking around the internet I found a bevy of people doing similar things, (links to everyone just below the video). So what follows is a re-packaging of all their hard work, resulting in a robot controllable by both the Wii nunchuck's joystick or more interestingly its accelerometers.

A quick video of my Arduino Controlled Servo Robot - (SERB) being controlled by a Wii nunchuck.


(resources)
  • (here) - Arduino Code - Chad at WindMeadows.com has written excellent arduino code for reading the Wii nunchuck. Code which I have included pretty much verbatim in this project. if you're interested in more technical details this is where to look.
  • (here) - Nunchuck Details - WiiLi.org has a great wiki about all things Wii, this is a link to a page that describes the nunchucks protocol and how to calibrate your nunchuck.
  • (here) - WiiChuck Adapter - Tod of todbot.com very kindly produced a small adapter to make plugging your nunchuck into a breadboard particularly easy.

(similar projects)
  • (here) - Wireless Nunchuck Control - Frank over at Society of Robots went one step further adding a wireless link so he can control his Arduino robot with all the tilt and twist fun from afar.
  • (here) - Nunchuck Controlled Pan and Tilt Camera - Using a Nunchuck and an Arduino to control the pan and tilt of a camera.
  • (here) - Nunchuck and Arduino Controlled Canoe - Finally a rather epic project that uses an Arduino, nunchuck, servos and small trolling motor to drive a Canoe.

(if you have an Arduino nunchuck project you've completed drop me a line and it can be added here)
(shameless plug)
To check out more of our lovely open source projects - oomlout.com
 
Remove these adsRemove these ads by Signing Up
 

Step 1Parts & Tools

Parts & Tools
Only a few parts to collect before we get wiring and programming

Robot - (Arduino Controlled Servo Robot - (SERB) )
( build your own , or purchase a lovely kit ($175)
  • We use an Arduino Controlled Servo Robot - (SERB) however any Arduino powered dual servo robot will work. Other options (here)

Electronics - ($24)
  • Wii Nunchuck - ($20) - (Amazon) , or at your closest Blockbuster or CircuitCity
  • WiiChuck Adapter - ($4) - A small circuit board that allows you to plug your nunchuck into a breadboard without modifying it. (if you don't want to use your nunchuck on your Wii you can save yourself four dollars and simply cut the connector off and plug the wires directly into your breadboard) - (FunGizmos)
  • Assorted pieces of Breadboard wire - (22 AWG solid)

That's it onto Wiring it up
« Previous StepDownload PDFView All StepsNext Step »
40 comments
Jul 10, 2010. 11:59 PMjac.diamond says:
Is the code posted alright? Im thinking of doing this but i dont want to buy the stuff until i know its alright.
Aug 18, 2010. 5:08 AMcarlosanchez says:
I found the original code Here you go! http://oomlout.com/tmp/SERB_WiiNunChuckControl.txt
Jul 27, 2011. 12:16 PMdoby162 says:
This is an awesome guide!! Thanks oomlout and also thanks to carlosanchez for providing the uncorupted code :P I will definantly link to this in the instructable I make with my nunchuck :D
May 14, 2011. 7:07 PMJordan arduino says:
Guys could you give me the website for the circuit
Apr 30, 2011. 8:21 PMwamj says:
i think that the next logical step would be hide an xbee, a rechargeable battery, and charging circuit to make a wireless version
Feb 7, 2011. 7:26 AMtmj61 says:
Is the kit no longer available? when i try to go to the l "purchase a lovely kit" link it does not work.
Jul 22, 2009. 9:39 PMHoolaput says:
why would you want to use the 5v if there's a 3v3 (3.3v) on the arduino beside the reset and 5v?
Aug 18, 2010. 5:12 AMcarlosanchez says:
The 3.3V is supplied by the FTDI chip. Therefore it will only be available if the Arduino is powered via USB. If it is connecter to a battery, the chip will be bypassed.
Nov 28, 2009. 6:27 PMAsuraku says:
 This code is an absolute mess and I can't seem to figure out how to fix it. Could someone post an un-scrambled working copy?
Aug 18, 2010. 5:08 AMcarlosanchez says:
http://oomlout.com/tmp/SERB_WiiNunChuckControl.txt
Jan 13, 2010. 6:59 PMMdob says:
Agreed, code is screwed; lets hope that Oomlout fixes it soon.
Aug 18, 2010. 5:09 AMcarlosanchez says:
http://oomlout.com/tmp/SERB_WiiNunChuckControl.txt
Aug 17, 2010. 7:07 AMcarlosanchez says:
Hello! Would it be possible to post the code in a .pde file? The one pasted in the Instructable is scrambled in the beggining and is really hard to fix. Thanks!
Jul 14, 2010. 2:47 PMDannne11 says:
how doe you connect the servos???
Jan 22, 2010. 11:44 PMxava100 says:
someone should try this with the classic controller since there isnt any other use for it
Nov 1, 2009. 12:56 PMisambard1000 says:
 Hi Oomlout, the Arduino code seems to have got scrambled... can you repost it or email it to me. Thanks!
Sep 30, 2009. 6:09 PMTXTCLA55 says:
Hello again I just built the robot and well something is screwed up. I built it to your diagrams, pictures, and code and all I got was this:

http://www.flickr.com/photos/14462918@N03/3970656962/

The video pretty much shows the problem...NOTHING WORKS! By the way I just spent around $100 on this project and I was hoping that it would work.
Jul 23, 2009. 6:02 PMtristantech says:
If you want to save a few bucks but dont want to cut your nunchuck cord (it would be a shame to ruin such a nice toy) just take some double-sided copper clad board and use a dremel to carve traces like in the adapter the author used. I used to trick with a gamecube controller.
Jun 9, 2009. 8:27 PMZeusFury says:
i think i am missing _SERB_WiiNunchuckControl.hex because i got this error ....FR0N58YFUI0OXF5\_SERB_WiiNunchuckControl\applet\_SERB_WiiNunchuckControl.hex': No such file...FR0N58YFUI0OXF5\_SERB_WiiNunchuckControl\applet/_SERB_WiiNunchuckControl.cpp:133: undefined reference to `beginSerial'... i would really like some help on this pleas
Jun 8, 2009. 4:24 PMfred_thedog says:
I get the same error as TXTCLA55. Haven't spent any time trying to find the problem yet though.
May 30, 2009. 9:17 PMZeusFury says:
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

i got these errors can some 1 help
May 23, 2009. 8:37 PMevmaster297 says:
with a wire less nun chuck, it looks like an awesome coaster to me!!! but eventually a dog toy
May 9, 2009. 10:43 AMTXTCLA55 says:
Errpr code: arduino cannot determine program size, says it cannot find the files needed
May 10, 2009. 6:15 PMTXTCLA55 says:
nope same error. I tried deleting the stuff at the end ( labled "delete if not using") and I still got error codes. I'll try sending a email to the one you suggested.
May 8, 2009. 11:01 AMFoaly7 says:
Dude. Totally use a wireless WiiChuck and tweak its range and mount a camera on your 'bot and you can have a surveillance bot!
Feb 5, 2009. 1:09 AMrenamecor says:
How cool is that, I'm off to see if I can find my daughters WREX and insert a wii nunchuck where the sun don't shine.

What about wireless nunchuck - WIreless Nunchuck

Dec 26, 2008. 8:24 AMYummyPancakes says:
Very, very cool! I just got a Wii for Christmas, and "Santa" accidentally brought us an extra Nunchuck and Wiimote. Together with my brand new Arduino Duemillanove, this is perfect! Thank you, and Merry Christmas!
Dec 17, 2008. 8:09 AMririgoyen says:
you should look at Nyko's Kama (Wireless Nunchuck). You'll make your robot wireless in 4 seconds.
Dec 20, 2008. 2:12 PMexplosivemaker says:
.....definitely.....a remote control car with a motion controller would be sweet....or a plane....
Dec 19, 2008. 12:20 PMfwjs28 says:
ha!nice mug...lol... here my version.... 1take wii mote and robot 2 tie wii mote to robot 3 drag wii mote and make robot move.......
Dec 19, 2008. 6:47 PMcantthinkof bettername says:
I just posted a comment almost the same, because I didn't read the comments first.
Dec 20, 2008. 5:53 AMfwjs28 says:
ha..yea i see that....i like the mug its hilarious...
Dec 19, 2008. 6:49 PMcantthinkof bettername says:
My method (and fwjs28's) was the first thing I thought of when I posted the first comment, even before I clicked the instructable.
Dec 19, 2008. 5:26 PMwolf555hound says:
OMG, you stole MY method!!! hehe
Dec 19, 2008. 5:30 PMfwjs28 says:
um.....nu-uh.....its mine, allllll mine....lol....but my method also works......just not as accurate maybe.....
Dec 19, 2008. 7:24 PMwolf555hound says:
no! see!
proto.bmp
Dec 19, 2008. 6:46 PMcantthinkof bettername says:
I know how to do it with just the nunchuck and the robot. Step 1: Tie the wire to the robot. Step 2: Have fun!
Dec 19, 2008. 6:12 PMmithunashok says:
Mann...that was cool....

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
381
Followers
14
Author:oomlout