pyupm_nunchuck module

class pyupm_nunchuck.NUNCHUCK(bus)[source]

Bases: object

API for the Wii* Nunchuk controller.

ID: nunchuck

Name: Wii Nunchuk

Category: accelerometer

Manufacturer: generic

Link:http://wiibrew.org/wiki/Wiimote/Extension_Controllers

Connection: i2c

Kit: robok UPM module for the Wii Nunchuk controller. This module was tested with Wii Nunchuck connected to I2C via a Grove Wii Nunchuck adapter.

Seehttp://wiibrew.org/wiki/Wiimote/Extension_Controllers andhttp://wiibrew.org/wiki/Wiimote/Extension_Controllers/Nunchuck for more details on the controller and its protocol.

A warning for the Grove Wii Nunchuk adapter: it has 2 traces on one side, and 3 traces on the other. Do not match these up with the Nunchuk connector’s traces. The connector’s ‘groove’ should be on the same side as the Grove interface socket on the adapter.

C++ includes: nunchuck.hpp

accelX
accelY
accelZ
buttonC
buttonZ
stickX
stickY
update()[source]

void update()

Reads and updates the current state of the controller.