[HowTo] Nintendo Wii Nunchuck (i2c + Grinch Kernel)

Requirments:

  • The Grinch Custom Kernel 21.3.2 or above
  • Nintendo Wii Nunchuck
  1. Connect your Wii controller to I2c. You can use Wii adapter.

GND J3A1-14 (-)
VCC J3A1-16 (+)
SCL J3A1-18 (C)
SDA J3A1-20 (D)

  1. Pair controller with receiver

  2. Check i2c bus. Reciever will be detected 0x52 address.

sudo i2cdetect -y -r 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- 52 -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --
  1. First way. Get data by cpp

Download c soruce & compile

wget http://www.jarzebski.pl/files/jetsontk1/grinch-21.3.2/wii.c
gcc wii.c -o wii

Execute wii:

  1. Second way. As joy device:
echo wiichuck 0x52 | sudo tee /sys/class/i2c-dev/i2c-1/device/new_device

lsmod will show:

Module                  Size  Used by
wiichuck                2461  0 
input_polldev           2317  1 wiichuck

Axis 0,1 - Joystick (X,Y)
Axis 2,3,4 - Accelerometer (X,Y,Z)

Have you fun! :)

Amazing… thank you really much!