Hacking the Wii Nunchuk

Hello everyone, in this post we are going to learn how to connect the Nintendo Wii Nunchuk controller to the Arduino, and use it as an input device, to control the mouse.

Nunchuk and Arduino

In order to interface with the Nunchuk, we are going to use the ArduinoNunchuk library, written by Gabriel Bianconi.

The Nunchuk must be connected to the Arduino in this way:

Nunchuk Connection scheme

So, we will use analog pin 4 and 5, besides 3.3V power and ground.

The required softwares are two also this time: the sketch, that communicates through the serial port the input data received from the Nunchuk, in the format “analogX analogY cBtn zBtn”: x and y coordinates of the analog joystick, and the value of C and Z button (1 for pressed, 0 for released); every value is separated from the other with a white space.

The software that run on the computer is written in Python again, and it analyzes the input from the serial port and simulate mouse movement and clicks, using the pymouse library.

However, you can’t hold the left button pressed, for example to drag icons.

Stay tuned!



Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione /  Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione /  Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione /  Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione /  Modifica )


Connessione a %s...