Skip to content
 
 

Latest commit

 

History

26 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

ModNunchuck

This contains files required for using the Wii Nunchuck for Raspberry Pi, hacked together from:

https://github.com/OLIMEX/raspberrypi MOD-WII - Wii nunchuk with 3 axes accelerometer, joystick, two buttons

https://github.com/Boeeerb/Nunchuck

Requirements

sudo apt-get install python-smbus

Functions

The functions of nunchuk are:

from nunchuck import nunchuck
wii = nunchuck()

wii.raw()                       # Returns all the data in raw
wii.joystick()                  # Returns just the X and Y positions of the joystick
wii.accelerometer()             # Returns X, Y and Z positions of the accelerometer
wii.button_c()                  # Returns True if C button is pressed, False if not
wii.button_z()                  # Returns True if Z button is pressed, False if not

wii.joystick_x()                # Returns just the X position of the joystick
wii.joystick_y()                # Returns just the Y position of the joystick
wii.accelerometer_x()           # Returns just the X position of the accelerometer
wii.accelerometer_y()           # Returns just the Y position of the accelerometer
wii.accelerometer_z()           # Returns just the Z position of the accelerometer

About

Control your Pi or Arduino with a Wii Nunchuck

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages