Arduino Forum

Topics => Robotics => Topic started by: beepboop on Nov 06, 2012, 01:00 pm

Title: Help with Aduino UNO + Wii nunchuck + Servo Motors
Post by: beepboop on Nov 06, 2012, 01:00 pm
Hello, everyone.

I am new to the whole Arduino scene. However due to some college project, I have to take up the versatile and wonderful, yet confusing world that is the Arduino. Thus, I decided to ask for everyone's help. The end project that I must complete Before December is to read the angle at which a Wii nunchuck is held at and then have the Arduino send a signal to a servo motor to move it to the read angle. I don't know if this is a fairly simple project or if it is outlandishly difficult. I know that from all the research I've done, it's proving to be very tricky. The main reason being that I can't even get it going.



I decided that before I tackle the big fish, I wanted to the Arduino to be able to read the values from a Wii nunchuck and read it from the serial monitor. Thus I got the code from http://todbot.com/blog/2008/02/18/wiichuck-wii-nunchuck-adapter-available/comment-page-2/#comments (http://todbot.com/blog/2008/02/18/wiichuck-wii-nunchuck-adapter-available/comment-page-2/#comments) (everyone seems to be deferring me to that site...) and I ran the WiichuckDemo.pde, but all I got for the values were 0 for the accelerometers and 1 for the buttons whether or not I pressed them. Additionally, the program sometimes doesn't even start sometimes. I think that the problem is that I'm using an Arduino UNO and Tod, and pretty much the rest of the internet, uses a Duemilanova. People say that the difference isn't that great, but apparently it's enough to case this code to malfunction. Thus I was hoping that some kind-hearted person would walk me through this mess and perhaps even guide me to my ultimate goal of controlling the servo motors with the nunchucks.

Please and thank you!
Title: Re: Help with Aduino UNO + Wii nunchuck + Servo Motors
Post by: PaulS on Nov 06, 2012, 01:55 pm
The first question that you'll need to answer is whether you are using a real Wii nunchuck or a cheap Chinese knockoff.
Title: Re: Help with Aduino UNO + Wii nunchuck + Servo Motors
Post by: beepboop on Nov 07, 2012, 11:43 am
We are using a real nunchuck alright.  :)
Title: Re: Help with Aduino UNO + Wii nunchuck + Servo Motors
Post by: oric_dan on Nov 10, 2012, 06:54 pm
I don't know about todbot, but I used the code from this webpage, and it worked the first time,

http://www.windmeadow.com/node/42

One thing to remember is the Nunchuck is a 3.3V device only, and you don't want to power it
off 5V.