Chuck bindings to Wiimote

Introduction

Based on the work of G. Coleman, it is a class to interface Wiimote (+ Nunchuk) with the ChucK programming language using the OSC handler DarwiinRemoteOSC (yeah, I know, we need a free software alternative).

Prerequisites

Installation

Download the source from the repository:

$ git clone git://github.com/automata/chuck-wiimote.git

Using

Run DarwiinRemoteOSC, sync your Wiimote then load wiimote.ck at ChucK.

API

Here is the function listing but the file wiimote-test.ck will help you better.

FunctionReturn TypeDescription
connected()intreturns 1 if wiimote is connected
a()intreturns 1 if wiimote’s A button is pressed
b()intreturns 1 if wiimote’s B button is pressed
up()intreturns 1 if wiimote’s UP button is pressed
down()intreturns 1 if wiimote’s DOWN button is pressed
left()intreturns 1 if wiimote’s LEFT button is pressed
right()intreturns 1 if wiimote’s RIGHT button is pressed
minus()intreturns 1 if wiimote’s MINUS button is pressed
plus()intreturns 1 if wiimote’s PLUS button is pressed
home()intreturns 1 if wiimote’s HOME button is pressed
one()intreturns 1 if wiimote’s 1 button is pressed
two()intreturns 1 if wiimote’s 2 button is pressed
accX()floatreturns a float number representing the wiimote’s acceleration in the X-axis
accY()floatreturns a float number representing the wiimote’s acceleration in the Y-axis
accZ()floatreturns a float number representing the wiimote’s acceleration in the Z-axis
roll()floatreturns a float number representing the wiimote’s roll movement
pitch()floatreturns a float number representing the wiimote’s pitch movement
irdata()*** is not implemented yet ***
battery()floatreturns a float number representing the wiimote’s battery level
nckJoyX()floatreturns a float number representing the nunchuk’s joystick movement in the X-axis
nckJoyY()floatreturns a float number representing the nunchuk’s joystick movement in the Y-axis
c()intreturns 1 if nunchuk’s C button is pressed
z()intreturns 1 if nunchuk’s Z button is pressed
nckAccX()floatreturns a float number representing the nunchuk’s acceleration in the X-axis
nckAccY()floatreturns a float number representing the nunchuk’s acceleration in the Y-axis
nckAccZ()floatreturns a float number representing the nunchuk’s acceleration in the Z-axis
nckRoll()floatreturns a float number representing the nunchuk’s roll movement
nckPitch()floatreturns a float number representing the nunchuk’s pitch movement