Our next robot we are planning to build we want to be able to control it using the Wii Nunchuck. I download some code from
Todbot.com that demonstrates controlling a servo. The brain of the robot is going to use the
Roboduino, and we had planned on recycling some old Hitron modems to use as the base. We’ll have to table that idea for later. Several attempts at making one into a robot base didn’t turn out so well. Mostly due to lack of tools. We found a robot base online that is designed for use with the Arduino and DC motors. I think we can alter it a bit to use servos instead. (Lets hope). It should be arriving in the mail at the end of this week.

Wiichuck Adaptor
Using the
sketch from Todbot, here is what you will need to be able to hook this up. You can pick up a
Wiichuck Adaptor at FunGizmos.com for $4.00. One of the cool things about the Wii is that the expansion port on the bottom of the Wii remote is an I2C serial connection. This means that anything that plugs into that port can work with microcontrollers like the Arduino or Basic Stamp or others. Of the available peripherals, the Wii Nunchuck is one of the best. It contains a 3-axis accelerometer, a 2-axis joystick, and two buttons. Hooking up a Wii Nunchuck to Arduino is easy. But cutting off the connector of the Nunchuck to get at the wires is a little drastic.

Wii Nunchuck testing with Arduino
For testing purposes, I have the Wiichuck Adaptor on a small breadboard with +5v and GND hooked up (red and black cables) Then the two I2C hook ups are as: Wiichuck Adaptor SDA (Green Cable) going to Arduino Pin 4. SCL (Blue Cable) going to Arduino Pin 5. For the Servo we are using +5v and GND (second pair of red and black cables) and the Yellow signal cable goes to Arduino Pin 7. There is a LED hooked up to Pin 13 and GND on the Arduino. The shorter leg of the LED goes into GND. You won’t need a resistor because Pin 13 has a built in resistor for it. You can pick those jumper cables up at
SparkFun.com, they come in handy.
Now that we have tested this, our next step is to get it working using two Xbee Wireless adapters. Guilherme Martins has been working with these on his robots, so hopefully we can learn from the examples he has on his blog. We picked up a couple of Xbee Adapter kits from Adafruit, and I have already started going through some of the testing stages to allow the Xbees to talk to each other. I will post more progress to our blog once the base arrives and we start getting things put together.
Tags: Adafruit, Arduino, Arduino Sketch, Code, Curious Inventor, FunGizmos, I2C serial connection, Project Notes, Roboduino, Robot, SparkFun, Wii Controlled Servo, Wii Nunchuck, Wiichuck, Wireless, Xbee, Xbee Adapter
This entry was posted
on Thursday, February 26th, 2009 at 12:41 pm and is filed under Syndicated.
You can follow any responses to this entry through the RSS 2.0 feed.
Both comments and pings are currently closed.