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.
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:
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.
However, you can’t hold the left button pressed, for example to drag icons.