Posts with «wii» label

Arduino Learns the Martial Arts with Nunchucks Input Device

There is a boring part of every computer introduction class that shows how a computer is made up of input, output, and processing. Maybe it wouldn’t be so boring if the input device was a nunchuck. [Brian Lough] thinks so and he belligerently asserts that nunchucks are the best input device ever. With a simple connection to a Wii controller and an associated library, you get access to an analog joystick, two buttons, and an accelerometer.

The nunchuck is meant to plug into a Wii controller and the connection is I2C, so that’s trivial to interface to an Arduino or other small microcontroller. The only issue is making the connection. We might have just snipped the wires, but [Brian] prefers to use a small breakout board that plugs into the stock connector and provides solder points for your own cable. There are options for the breakout boards, and [Brian] has his own design that you can get from OSHPark for about a buck for three boards. You can also just jam wire into the connector, but that’s not always robust.

The controllers use 3.3V which isn’t unusual these days. There’s an available library that makes reading them easy. Obviously, not all applications will be a natural fit, but we did like them on the Tetris game [Brian] created. It is also natural for any kind of motion control like his gimbal mount example.

Even if you don’t have junk Wii controllers hanging around, they are common enough on the resale market and you can buy new third-party controllers without spending much. Makes us sorry we threw away ours in the last move.

If you want to get serious hacking a nunchuck, you can go full custom. Or, just give up, and turn one into a Raspberry Pi.

Hack a Day 27 Jan 06:00

Tricking Duck Hunt to See A Modern LCD TV as CRT

A must-have peripheral for games consoles of the 1980s and 1990s was the light gun. A lens and photo cell mounted in a gun-like plastic case, the console could calculate where on the screen it was pointing when its trigger was pressed by flashing the screen white and sensing the timing at which the on-screen flying spot triggered the photo cell.

Unfortunately light gun games hail from the era of CRT TVs, they do not work with modern LCDs as my colleague [Will Sweatman] eloquently illustrated late last year. Whereas a CRT displayed the dot on its screen in perfect synchronization with the console output, an LCD captures a whole frame, processes it and displays it in one go. All timing is lost, and the console can no longer sense position.

[Charlie] has attacked this problem with some more recent technology and a bit of lateral thinking, and has successfully brought light gun games back to life. He senses where the gun is pointing using a Wiimote with its sensor bar on top of the TV through a Raspberry Pi, and feeds the positional information to an Arduino. He then takes the video signal from the console and strips out its sync pulses which also go to the Arduino. Knowing both position and timing, the Arduino can then flash a white LED stuck to the end of the light gun barrel at the exact moment that part of the CRT would have been lit up, and as far as the game is concerned it has received the input it is expecting.

He explains the timing problem and his solution in the video below the break. He then shows us gameplay on a wide variety of consoles from the era using the device. More information and his code can be found on his GitHub repository.

We’ve featured [Charlie]’s work in the retro gaming field before, with his HDMI mod for a Neo Geo MVS. Console light guns have made a lot of appearances on these pages, a recent one was this video synthesiser but it’s this burning laser mod that most children of the 1980s would have given anything to own.


Filed under: nintendo hacks, nintendo wii hacks