Source code: Freqin’ Wii
Hook a speaker to the output pin (defined below, 13 by default), and hook the Wii adapter up to analog pins 2-5, preferably using the Wiichuck adapter. Tilt the wii from side to side to adjust the tone, and tilt forward and back to adjust the octave. Push the joystick forward and back to adjust the length of the note. Push the Z button to play the note.
I’m trying to think of what else I could do with this. There’s just not a lot of data out there that can use three dimensions of acceleration data and two dimensions of joystick data.