Phase 1 of setting up the Nunchuck-based ArrBot remote control is getting the Wii Nunchuck set up and operational. We're using the most excellent WiiChuck adapter. Solder 4 pins onto the unit. Do it backwards from this picture and you will more easily see the silkscreened pin IDs when the unit is on a breadboard.
There are four wires to attach to the Arduino.
"+": either VCC (on a 3.3V arduino), or 3.3V (on a 5V arduino)
"-" - GND
"d" - SDA (A4 on Pro Mini)
"c" - SCL (A5 on Pro Mini)
Note: Pro Mini I2C pins are SDA (A4) and SCL (A5).
A4 and A5 are in a weird place on the Pro Mini. Look on the bottom and you will see where it is labelled. I soldered the headers so that the went above the board, allowing the Pro Mini to sit in a breadboard.
Here's the wires installed. For initial testing, the Pro Mini doesn't need to be seated in a breadboard. This may prove useful to us. We may be able to hook up the radio, battery, and Nunchuck lines directly onto the board and put everything into a tidy little case. If that's true, we may redo the pins to make the case as small as possible.
Attach the FTDI cable and run the ArrBot Nunchuck Tester. Open the serial monitor. Move the joystick, press the buttons, and shake the Nunchuck along all three axes. You'll see current, max, and min values. We'll use those later to calibrate.
Note: There are a ton of aftermarket nunchucks and counterfeit units being marketed as from Nintendo. A lot of the clones and counterfeits don't work. My genuine nunchuck works well, and comes with a little instruction label attached to the cable. If your nunchuck fails to produce good values in this program return it and get an authentic unit. Good Luck, even on Amazon there are plenty of counterfeits being sold as Nintendo units. :( :( :(
TODO: library setup
TODO add screen shot of program running.
No comments:
Post a Comment