As a fun weekend project, I converted an old Nintendo Wii Nunchuck controller into a mouse for my Macbook.
I got the project idea from Maker Magazine.
Here’s how it’s done.
Get an Arduino Uno microcontroller and a Nintendo Wii Nunchuck controller. We will read the Nunchucks’s button presses, joystick movement, and accelerometer readings via the Arduino.
Connect the Nunchuck to the Arduino using jumper wires (diagram here). Connect the Arduino to your Mac’s USB port.
Open the Arduino IDE at https://create.arduino.cc.
Load the Arduino Nunchuck driver available here:
https://github.com/GabrielBianconi/ArduinoNunchuk
On your Mac, run my Python 2.7 script. It listens on its USB port for control data from the Arduino. Change the USB port ID in the script to match yours. https://github.com/qwertyshan/WiiChuckMouse
Now, you can control mouse movements by turning the Nunchuck on x-axis or y-axis. Left and right mouse buttons correspond with the Nunchuck’s C and Z buttons. The joystick can be used to scroll.
Looks like you need a damper on there, friend. It’ll smooth out the jerky motion of the mouse.
LikeLiked by 1 person
Yes, I agree. That will be the version 1.1 feature. 🙂
LikeLike