Sunday, June 5, 2011

First Arduino Robot, with Wii Nunchuck Control

I received some generous cash gifts for my birthday and I knew just what to use them for: to buy some parts to build a robot I've had in mind since December. The parts came Friday so I spent my free time this weekend getting the basics up and running. Click the image at left for a short video of the results.

The robot chassis is this kit from Maker Shed: a nice, simple base to build on. The brain of the robot is an Arduino microcontroller. And I also used the Motor Shield from Adafruit.com which is a very flexible and convenient way to control motors from an Arduino. A "shield" is another circuit board with pins that line up with the Arduino's pins so you can just put the shield right on top of the Arduino. You can even stack multiple shields. My ultimate goal is to use my iPhone as a remote control for the robot so it will also have a wi-fi shield soon for wireless communications.

I've had the LEGO Mindstorms NXT set for a few years and have enjoyed it. I'll keep using it and in fact will learn how to interface it to the Arduino. But the Arduino is a much more open and flexible controller. If you google Arduino you'll see that it gets used for an amazing number of creative projects.

I needed a way to control the robot until I get the iPhone remote control figured out. One of the easiest ways to provide directional input is with a nunchuck controller from a Wii. The communication protocol that the nunchuck uses (I2C) is supported directly by the standard Arduino libraries, and the Arduino community is broad, so it was easy to find the code I needed to make that work.

I'm very excited to finally be working with the Arduino. If I can find the time, I'd love to demonstrate a project at Maker Faire in September. And I'd really love to take a robot to the Robot Block Party at the Boston Museum of Science next April. I have a concept in mind for a great demonstration robot that kids would love - it will make souvenirs for them.

In the Arduino open source spirit, you can find the source code here:

Creative Commons License
Arduino Nunchuck 2-Wheel Control is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License


No comments: