USB Mouse Made Out of a Wii Nunchuck





Introduction: USB Mouse Made Out of a Wii Nunchuck

This instructable will describe how to convert a Nintendo Wii Nunchuck controller into a USB 2-button mouse using a Teensy USB.  The Teensy USB is a very user-friendly development board that can be programmed in an Arduino environment. The Teensy USB development board and necessary software are available at

Check out the final product in action!

Step 1: Materials

This is what you'll need:

-  Nintendo Wii Nunchuck Controller, available at various retailers
-  Teensy 2.0 USB Development Board, available at
-  USB cable, available at
-  Breadboard (for prototyping), available at
-  22 Gauge Wire, available at
-  Solder, available at

Aside from the components listed above, you should have access to various tools such as a soldering iron and ancillary hand tools. Additionally, you should have basic soldering skill and working knowledge of the Arduino environment before embarking on this journey. 

Step 2: Nunchuck Disassembly

Remove the two screws on the underside of the Nunchuck controller using a tri-wing screwdriver and un-clip the top shell of the Nunchuck to expose the electronics.

Remove the electronics and un-clip the two hooks of the white molded plastic part at the center to access the electrical connectors of the x and y-axis potentiometers.

Remove the flexible membrane to access the electrical connectors of the C and Z buttons. The middle connection (red wire) is the Z button and top connection (black wire) is the C button.

Step 3: Prototyping on Breadboard

As good practice you should always prototype your project on a breadboard. The Teensy 2.0 comes with optional header pins making prototyping a breeze. Connect the Teensy controller to the inputs of the Nunchuck controller in the following manner:

Teensy              Nunchuck
GND                  Ground (each potentiometer and buttons)
+5V                    5 Volts (each potentiometer)
F0                      X-axis potentiometer output
F4                      Y-axis potentiometer output
D2                     C button
D3                     Z button

Once you've connected everything per the table above, you're ready to program. In addition to putting the attached code into the Arduino window, make sure the settings are correct for this project. The board should be identified as "Teensy 2.0" and the USB Type "Keyboard + Mouse".

Upload the code and press the reset button on the Teensy. Play around with the joystick and both buttons to confirm everything is working the way it should. A simple mistake would be to mix up the X and Y directions or the C and Z buttons, but that can be easily fixed by swapping the connections on the breadboard (another good reason you should always prototype everything).

Step 4: Final Assembly

Once you have the code right on the Teensy it's time to prepare all the components for final assembly.

Nunchuck shell modifications
- Trim both halves of the shell as detailed in the pictures to make room for the additional hardware

Electronics modifications
- Using a soldering iron, remove all header pins from Teensy board
- Trim and strip all wires coming from the Nunchuck electronics and solder them directly into the Teensy board. You're working with in  snug quarters so make sure you make your assembly nice and tight.

After those simple modifications have completed the electronics should fit right into the lower half of the shell. Once the electronics are in, all you need to do is snap the halves back together and install the screw into the remaining screw hole. Plug it in and enjoy!

USB Contest

Finalist in the
USB Contest



    • Creative Misuse Contest

      Creative Misuse Contest
    • Water Contest

      Water Contest
    • Clocks Contest

      Clocks Contest

    40 Discussions

    Is it possible to make something similar with wii guitar hero drums? The cable is so similar to nunchuk

    Im making my own wii nunchuck mouse, but swapped the joystick for 1 with a button in it. I had some trouble hooking up the C and Z buttons, and found out you apparently made a mistake. The black wire goes to ground, the red and white wire are for the C and Z buttons (use INPUT_PULLUP).

    I am having troubles with viewing the code. Everytime I click on it it turns into a random jumble of HTML. Does anyone know why this is happening? I have the Arduino IDE, so that's not a problem.


    4 replies

    After some trying i decided to download the code, but chose file type as 'all types', and added .pde after the file name (making it a .pde file). After that i opend the file in Code::Blocks and...tada! the code! (I hope) Im gonna test it after hooking it all up, but it seems to be it :D Heres the code:

    signed int xanal;

    signed int yanal;

    int mouse_l;

    int mouse_r;

    unsigned int i = 0;

    #define x_t_low 190

    #define x_db_low 480

    #define x_ctr 123

    #define x_db_hi 505

    #define x_t_hi 772

    #define y_t_low 222

    #define y_db_low 520

    #define y_ctr 133

    #define y_db_hi 550

    #define y_t_hi 831

    void setup() {




    void loop() {

    signed int xmove = 0;

    signed int ymove = 0;



    // linear - low speed

    if (xanal < x_db_low && xanal > x_t_low || xanal > x_db_hi && xanal < x_t_hi) {

    xmove = ((xanal / 4) - x_ctr)/18;


    if (yanal < y_db_low && yanal > y_t_low || yanal > y_db_hi && xanal < x_t_hi) {

    ymove = (-1*((yanal / 4) - y_ctr))/18;


    // linear - turbo

    if (xanal < x_t_low || xanal > x_t_hi) {

    xmove = ((xanal / 4) - x_ctr)/12;


    if (yanal < y_t_low || yanal > y_t_hi) {

    ymove = (-1*((yanal / 4) - y_ctr))/12;



    // click and drag

    // right click

    if(digitalRead(7) == HIGH)

    { if(digitalRead(7) == LOW)


    mouse_r = 1;

    } else {

    mouse_r = 0;


    } else {

    mouse_r = 1;


    // left click

    if(digitalRead(8) == HIGH)

    { if(digitalRead(8) == LOW)


    mouse_l = 1;

    } else {

    mouse_l = 0;


    } else {

    mouse_l = 1;


    Mouse.set_buttons(mouse_r, 0, mouse_l);


    I just tried and it worked fine for me, maybe the instructables site was acting funny when you first tried it. Please let me know if you have any other issues, if need be I'll be happy to email it to you directly.

    Thanks for the interest!

    same problem here... cant download code propperly. Maybe post the code as a comment, so we can copy paste it?

    I downloaded a different browser to see if it was my browser, but whenever I download it, it turns from "teensy_mouse_clean.pde" to "F0T0YIKGQ5Q49T.tmp", which the Arduino IDE continually refuses to open. I tried converting it to a .pde file, but none of my attempts worked. If you could, could you please email it to me directly? God bless you for your help!


    Fantastic project! Could you please include a photo showing how the wires connect to the nunchuck pcbs? You cannot see that at all in your photos. THNX!!

    Would this work for all computers? What i mean is, if you plug the usb plug into another computer without any software, would it run like a regular mouse? I guess what i'm asking is, do you need pre-installed software to be able to use the mouse?

    4 replies

    There is no software required. The controller mimics a mouse/keyboard, so it'll work on any PC, not sure about macs. Thanks for your interest!

    what 'bout chrome os?!?!?!?!


    2 years ago

    It would seem a much better idea to connect the nunchuck using it's existing wires instead of pulling it apart.

    Here is how:

    Is it work with teensy 3.1.

    is this a mouse as in the joystick is the cursor and the Z/C buttons are right/left click? if so, cool!

    Please provide details for where the ground, 5v, and output of each potentiometer is located. It looks like you have some wires that run up underneath the analog stick that aren't in the "pre-instructables" nunchuck...

    1 reply

    Did you work out any solution to this? I'm trying also to figure out the outputs of the potentiometers...

    I'm having a hard time figuring out which wires inside the nunchuck correspond to the buttons/joystick. Could you post some sort of color chart or some other explanation.