Skip to content
Wii Nunchuck Library for Arduino
C++ Other
  1. C++ 59.1%
  2. Other 40.9%
Branch: master
Clone or download

Latest commit

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
README.md
Wiichuck.cpp
Wiichuck.h
keywords.txt

README.md

Wiichuck

Wii Nunchuck Library for Arduino

Written by jnw.walker@gmail.com Originally hosted on http://code.google.com/p/wiichuck/

Installation

  1. Extract to the hardware/libraries directory in your Arduino install directory.
  2. Compile by either reloading the Arduino IDE or selecting the board again.

Usage

Create a new instance of this class with the default constructor:

Wiichuck chuck;

Initialize the controller by specifying what pins you've connected VCC and GND to. Default with be analog pins 2 and 3. Specify 0 if you've connected the controller to VCC and GND instead of output pins.

chuck.init(); chuck.init(12, 13); chuck.init(0, 0);

Requests data from the nunchuck

chuck.poll();

Sets the zero values to the last values read from the controller.

chuck.calibrate();

Get the values of the joystick/accelerator/buttons

chuck.joyX(); chuck.joyY();

chuck.accelX(); chuck.accelY(); chuck.accelZ();

chuck.buttonZ(); chuck.buttonC();

You can’t perform that action at this time.