Using a wii nunchuck This works and everything you need.

lpbug said:
Aw that's a bummer. When the connection drops (I also tested this by pulling out battery), the values stay constant at whichever value it was at before the battery was pulled. I suppose you can implement a 5 second check on whether accelerometer values are changing but that's still slow in my opinion.

I completely agree, safety and reliability are paramount. However, I don't think it needs to be 5 seconds. I will play with it and see what I can get to work consistently, but now I think about it I suspect we could use a much smaller delay than that. I really like the Wii nunchuck controller, and I'm going to see what I can do to make it work.
 
voodoojar said:
Arduino to ESC
ESC gnd to gnd on arduino
ESC to digital pin 9 on arduino
Leave the ESC + alone unless you want to power your arduino with it and you know it is putting out 5v. If you do want to power your arduino from the ESC -- ESC + to arduino Vin make sure no other power it going to your arduino or you will have a bad time

Are you powering the Arduino with your ESC? I'm using the same ESC (HK 150a). I think I'm understanding everything else you explained, just need better clarification of the wiring to your ESC. Thanks!
 
When I plug my setup (nunchuck-->sparkfun-->arduino) into my computer's USB I get this error message:

Because a USB device was drawing too much power from your computer, one or more of your USB devices have been disabled.

I've uploaded the sketch and wired the sparkfun as explained here. Any ideas what's going on?

EDIT: I'm using a generic arduino nano v3.0, as ebay listed it and as it's printed on the device. BUT the arduino program would only read it as a micro, which allowed me to upload the sketch. :?: So I'm not really sure what I'm using. lol. I've also read that the a4/a5 pins on nano/uno correlate to d2/d3 on the micro. Maybe I should just get a generic uno, which is what I've seen you folk predominantly using, if I'm not mistaken. Also using the memorex wireless nunchuck.

UPDATE, 4/28/14: I needed to install the drivers (for mac, in my case) from here: http://www.ftdichip.com/Drivers/VCP.htm

Successful communication between nano and computer. Now I'm just trying to calibrate with ESC (HK 150a).
 

Attachments

  • photo(1).jpg
    photo(1).jpg
    258.8 KB · Views: 3,254
After playing around with the setup and unsuccessfully getting basic sketches to work, I'm thinking the board is just faulty. I've heard of people getting defective ones. So I ordered another nano clone (from the US this time, not China) and hopefully it'll make a difference.
 
I had to download some drivers, which I got from: http://www.ftdichip.com/Drivers/VCP.htm

Not sure which ones I needed but I downloaded them all (for mac). Arduino IDE recognizes the board now and has uploaded successfully with serial monitor spitting out numbers!

Thanks for the help voodoo! :D Now I'm just trying to calibrate with my ESC...
 
kkEdlund said:
Once I have everything down to a plug-and-play setup, I will start a new thread with download links if anyone is interested.

Count me as interested! I'm having trouble getting this project off the ground and it doesn't help that I'm completely new to arduino. I'm hoping once I get it up and running I'll be able to reverse-learn code by observing what actions produce what numbers and how it all relates.

Are you using Memorex? I forget who's using what nunchuck with what ESC.
 
I'm in the process of soldering everything up right now, but just noticed that the nano has 2 gnd pins. Do I have to put both gnd (from adapter and from esc) on the same gnd on the nano?
 
I ordered an adaptor but it never arrived.. now I am thinking i might just solder the wired directly to the rx board (someone did it but i lost the threat). Can anyone tell which pin on the adaptor relates to which one on the actual rx board?
 
Update: I used a nunchuck extension cable as described here: http://www.instructables.com/id/Wireless-Wii-Nunchuck-control-of-Arduino-projects/?lang=de just without the pullup resistors 'cause they should be built in. (and there are none on the sparkfun adaptor, so why should they be needed?)

Without the nunchuck attached the serial reads Joy =-132 Speed = 95 but as soon as I plug in the nunchuck, I get no more lines on the monitor.

I know that the nunchuck works and have tried it with a wired one and got the same result. Does anyone have an idea about that?
 
furp said:
Update: I used a nunchuck extension cable as described here: http://www.instructables.com/id/Wireless-Wii-Nunchuck-control-of-Arduino-projects/?lang=de just without the pullup resistors 'cause they should be built in. (and there are none on the sparkfun adaptor, so why should they be needed?)

Without the nunchuck attached the serial reads Joy =-132 Speed = 95 but as soon as I plug in the nunchuck, I get no more lines on the monitor.

I know that the nunchuck works and have tried it with a wired one and got the same result. Does anyone have an idea about that?

Does it work when you plug in the nunchuck before powering up the Arduino? Most of them require you to send initialization bytes to function properly. ( which typically get sent in the beginning of the program )

voodoojar said:
bec +5v to "vin" pin on the arduino. "Vin" in input voltage on Arduino.
Clarification: If you have a 5v BEC output, you should wire it directly to the 5v pin... the Vin pin goes to an onboard regulator, which typically has a 6v~7v dropout voltage. A lot of ESCs have 6v outputs, though, which need to go to Vin.




Another thing for anybody using these: I killed two wireless Nunchucks by running them off a 5V I2C bus; one started unsyncing every few seconds and the other just stopped syncing entirely. Haven't had a problem since I stuck a 3.3v regulator onto the board and used it for I2C / the nunchuck.
 
Just tested it again to be sure: No change if I plug in the nunchuck before plugging the arduino to usb either.

About the 5v BEC: So will I have trouble powering my arduino with a 5v BEC or will it work even if i put it directly to the arduino 5v pin?
 

Attachments

  • nunchuck.jpg
    nunchuck.jpg
    193.9 KB · Views: 2,929
Have you confirmed that your wiring is all correct? SDA to A4, SCL to A5, etc...
I remember the wire colors on my Wii extension cable from Monoprice not being consistent with the ones in the Instructables.


It might also be worth trying a different library; this one should work: http://www.gabrielbianconi.com/arduinonunchuk/

A 5v BEC will work when connected to the 5v pin; just make sure that your BEC actually is 5v and not 6, or you risk frying the Arduino.
 
Hmm, tried a delay in the setup and the different library as well, nothing helped.

I am not perfectly sure about the wiring, but I know that the nunchuck gets power since on the wireless version I can get the onbaord led to blink for syncing. I have copied the wiring from the above linked instructable 'cause it had the same wire colors as mine, so I guessed it might be the same extension cord. Thanks a lot for your help by the way!
 
Here's another update: Got my delayed adaptor today and finally get readings correcponding with the wired nunchuck movements, but it seems like the joystick never hits 0 but always stays at 1 or 2, so speed keeps increasing if i do nothing.

The wireless one puts out reactions that dont correspond to the stick movements or buttons at all, just has its own life..
 
voodoojar said:
I've noticed this has been a hard nut to crack for a lot of people so here is everything you need and how to do it. I'm using an uno but as long as it's an Arduino with the Atmega328P chip you should be ok.

the Sketch -- http://voodoojar.com/wiiskate/nunchuck2.zip
the Libraries -- http://voodoojar.com/wiiskate/libraries.zip

How to do it
Uncompress nunchuck2.zip to desktop
Uncompress the libraries.zip to -- Documents -> Arduino (you are replacing the existing Libraries folder with this one.)
Open the nunchuck2.ino in Arduino IDE, verify sketch and upload to your board.

wiring --
arduino.jpg


Wii to Arduino
this is pretty standard but from wiimote using the sparkfun wiinunchuck adapter https://www.sparkfun.com/products/9281
from outside
gnd to gnd
+ to 5v on adruino
d to a4 on arduino
c to a5 on arduino

Arduino to ESC
ESC gnd to gnd on arduino
ESC to digital pin 9 on arduino
Leave the ESC + alone unless you want to power your arduino with it and you know it is putting out 5v. If you do want to power your arduino from the ESC -- ESC + to arduino Vin make sure no other power it going to your arduino or you will have a bad time

Open Serial monitor and test it out. (make sure you baud on Serial Monitor is set to 115200 or you wont see anything)
You will need to make adjustments based on the type of nunchuck and ESC but this will get you 99% there.



Problem I haven't sorted out -- when turning on power sometimes the nunchuck wont communicate with the Arduino. This could be the $8 nunchuck I'm using, the order I power up parts or who knows. I ordered a wired nunchuck for testing since that's the only way I can totally eliminate connection issues for testing.

Also, thanks to the people who wrote the libraries and Mantis who wrote the sketch.

I'm doing this exactly as it says, and I cant seem to get it verifying properly, says its missing **.h file, usually Line 1 or Line 2 error. No matter how i switch them around they all fail at the first/second line. So is there some kind of code I'm missing or maybe I didnt import/add the files to the arduino. I have no idea....searched everywhere.

Complete noob here btw, first post and all, so any help would be very much appreciated!
 
@eldan - Checkout Wiiceiver code which is open source made by Austin David. https://github.com/jaustindavid/wiiceiver

You can use the source code on an arduino uno board and just use the board itself. However, you'll need to connect it to a Nunchucky for it to work.

And/or you can always purchase the Wiiceiver which is plug and play on my website here - http://diyelectricskateboard.com/product/wireless-wii-wiiceiver/
 
torqueboards said:
@eldan - Checkout Wiiceiver code which is open source made by Austin David. https://github.com/jaustindavid/wiiceiver

You can use the source code on an arduino uno board and just use the board itself. However, you'll need to connect it to a Nunchucky for it to work.

And/or you can always purchase the Wiiceiver which is plug and play on my website here - http://diyelectricskateboard.com/product/wireless-wii-wiiceiver/


Thanks again! got it working with the open source code from wiiceiver.
 
Hello guys! What's the latest consensus on which arduino to use? I've read that the uno, nano, and micro all work. Just make sure it has the ATMEGA328p chip. I guess I'm leaning towards the nano. Any other tips someone can offer?

I ordered a wireless nyko kama nunchuck and the spark fun wii adapter. Any help is much appreciated! :D
 
Someone tried Nano so far?

Actually every Wireless-Nunchuck should work? Wanted to walk trough my local stores, trying to find one.
 
Back
Top