# NUNCHUK()

Compatible with:
DOS Maximite CMM MM150 MM170 MM+ MMX Picromite ArmiteL4 Armite F4 ArmiteH7 Picomite CMM2

Syntax:
NUNCHUK(funct, channel)

Description:
Returns data from a Nunchuk controller.
'channel' is optional and is the I2C channel for the controller (defaults to 3, the front panel).
'funct' is a 2 or 3 letter code indicating the information to return as follows:
JX returns the value of the joystick X-axis
JY returns the value of the joystick Y-axis
AX returns the value of the x acceleration
AY returns the value of the y acceleration
AZ returns the value of the z acceleration
Z returns the value of the z button (1 if pressed)
C returns the value of the c button (1 if pressed)
T returns the id code of the Wii device: &HA4200000=Original,
&HA4200101=Classic, &HA4200402=Balance
JXL returns the calibrated X value of the joystick in the far left position
JXC returns the calibrated X value of the joystick in the centre position
JXR returns the calibrated X value of the joystick in the far right position
JYT returns the calibrated Y value of the joystick in the top position
JYC returns the calibrated Y value of the joystick in the centre position
JYB returns the calibrated Y value of the joystick in the bottom position
AX0 returns the calibrated zero gravity value of the x-axis accelerometer
AX1 returns the calibrated one gravity value of the x-axis accelerometer
AY0 returns the calibrated zero gravity value of the y-axis accelerometer
AY1 returns the calibrated one gravity value of the y-axis accelerometer
AZ0 returns the calibrated zero gravity value of the z-axis accelerometer
AZ1 returns the calibrated one gravity value of the z-axis accelerometer

The Nunchuk must be previously opened with the WII NUNCHUK OPEN command.

Last edited: 15 December, 2020