iPod Serial and the Nunchuk
Wednesday, 31 March 2010
I uploaded a new sample sketch for my iPodSerial library that uses the Wii Nunchuk to control the iPod. I used todbot’s WiiChuck adaptor to connect the Nunchuk to the Arduino.
The Wii Nunchuk has a joystick, from which you can read the X and Y axes, a Z button, a C button and the 3-axis accelerometer. I mapped the controls so that: left/right on the joystick is skip forward/backward; up/down on the joystick is scroll up/down; Z button is Play; c button is Ok/Select; and a tilt backward (using the Y axis of the accelerometer) is the menu button.
You could of course map them any way you wanted to.
Here’s a quick video of it in action (the Arduino is off-screen to the right).
The Wii Nunchuk has a joystick, from which you can read the X and Y axes, a Z button, a C button and the 3-axis accelerometer. I mapped the controls so that: left/right on the joystick is skip forward/backward; up/down on the joystick is scroll up/down; Z button is Play; c button is Ok/Select; and a tilt backward (using the Y axis of the accelerometer) is the menu button.
You could of course map them any way you wanted to.
Here’s a quick video of it in action (the Arduino is off-screen to the right).
HeartChuck
Sunday, 08 March 2009
I’ve been messing around with the Arduino lately. It’s a fun, low-barrier-of-entry, platform for hacking around with LEDs, servos and other fun stuff.
Recently I ordered the kit for an OpenHeart: an LED panel in the shape of a heart that uses charlieplexing to minimize the number of I/Os required to address the LEDs. The instructions were great and I picked up some tips to make my soldering better. The author made it very easy, even providing a flash-based programmer that lets you define your animation sequence and writes the code for you, so for animations all you need to do is cut-and-paste the code into the Arduino IDE and download it.
Fast forward a week or two and I watched episode 109 of Make TV, where John Park made a personal flight recorder using an Arduino and a Wii nunchuck.
He used a Wiichuck to connect the nunchuck to the Arduino; it’s a really simple, but clever, board that saves you from having to hack off the custom connector, thereby rendering the nunchuck useless for future Wii boxing matches (and making you unpopular with your offspring in the process). The nunchuck has an I²C interface and the maker of the Wiichuck provides you with a wrapper to the Arduino’s Wire library that makes it really easy to get the accelerometer, button and joystick readings.
Tonight I decided to make the nunchuck control the openheart, which with all the hard work done by others didn’t take very long at all. The Arduino sketch is available for download if you’re interested.
Here’s a video of it in action:
Recently I ordered the kit for an OpenHeart: an LED panel in the shape of a heart that uses charlieplexing to minimize the number of I/Os required to address the LEDs. The instructions were great and I picked up some tips to make my soldering better. The author made it very easy, even providing a flash-based programmer that lets you define your animation sequence and writes the code for you, so for animations all you need to do is cut-and-paste the code into the Arduino IDE and download it.
Fast forward a week or two and I watched episode 109 of Make TV, where John Park made a personal flight recorder using an Arduino and a Wii nunchuck.
He used a Wiichuck to connect the nunchuck to the Arduino; it’s a really simple, but clever, board that saves you from having to hack off the custom connector, thereby rendering the nunchuck useless for future Wii boxing matches (and making you unpopular with your offspring in the process). The nunchuck has an I²C interface and the maker of the Wiichuck provides you with a wrapper to the Arduino’s Wire library that makes it really easy to get the accelerometer, button and joystick readings.
Tonight I decided to make the nunchuck control the openheart, which with all the hard work done by others didn’t take very long at all. The Arduino sketch is available for download if you’re interested.
Here’s a video of it in action: