Wii Hacks

Read wii nunchuck data into arduino

With a little hacking, data can be read from a wii nunchuck directly into an Arduino, using TWI (aka I2C). The nunchuck contains a 3 axis accelerometer, joystick and buttons for only $19.95. The same accelerometer in kit form, cost $34.95 at Sparkfun. Plus the nunchuck is already wired up in a nice clean case! So the wii nunchuck should fit nicely into anyones robotic project.

Arduino Nunchuck


Wiimote as bluetooth transciever for an Arduino

After some trying, I have been able to use a wiimote for two-way communication for an Arduino. So far I just have a proof of concept. The code is very rough. For the set up and wiring, first look at my earlier entry on using the wiimote for one way communication.


Perl communication to Arduino over serial USB

I recently switched from using plain Atmel chips to Arduino. Arduino is a development platform that uses an Atmel Atmege168 chip. It simplifies things a lot.

The Arduino board has a USB port. It has a built in FTDI chip for USB to serial conversions.

This HOWTO shows how to communicate between Perl/Linux and the Arduino. Because of the Arduinos FTDI chip, I can use regular serial communication, I just needed to first set up the USB serial adapter drivers. Most modern linux distro should come with them installed.

The perl script will transmit a number, starting at 0, to the Arduino. The Arduino will then echo that number back to your linux/perl computer.


Perl module for wiimote!

I wrote a perl module to interface with the wiimote. You can download the source here. It is fairly quick and dirty, but most of the wiimotes functions can be accessed by perl.

The axis, tilt, D-pad, keys, rumble, nunchuck joystick, nunchuck buttons and nunchuck tilt all work. The module accesses the C library, libcwiimote, that Joel Andersson wrote. Most of the real credit should go to him.

I have tested it on a laptop running Suse 10.0 with a USB bluetooth dongle. I got the dongle off ebay for $5.
lsusb lists my bluetooth dongle as: