1 -------------------------------------------------------------------------------
2 Nintendo Wii Nunchuk controller
3 -------------------------------------------------------------------------------
5 This is a collection of example captures of I2C traffic from/to a Nintendo
6 Wii Nunchuk game controller.
8 A Dangerous Prototypes Buspirate (v4) was used as I2C master to talk to the
12 https://en.wikipedia.org/wiki/Wiimote#Nunchuk
13 http://wiibrew.org/wiki/Wiimote/Extension_Controllers/Nunchuck
14 http://dangerousprototypes.com/docs/Bus_Pirate
15 http://dangerousprototypes.com/2009/08/19/bus-pirate-wii-nunchuck-quick-guide/
21 The logic analyzer used was a Saleae Logic (at 1MHz):
34 Buspirate Nunchuk I2C breakout adapter
35 ----------------------------------------
41 The basic setup after connecting to the Buspirate on /dev/ttyACM0
42 (115200, 8n1) via minicom was:
46 (1)>2 (I2C mode: hardware)
48 I2C>W (enable Buspirate power supplies)
50 See below for further per-file I2C commands used.
56 The sigrok command line used was:
58 sigrok-cli -d fx2lafw:samplerate=1mhz --time <ms> \
59 -p '3=SCL,7=SDA' -o <filename>
61 The <ms> and <filename> parameters vary depending on the file.
75 wii_nunchuk_set_reg.sr
76 ----------------------
85 wii_nunchuk_data_idle.sr
86 ------------------------
88 No buttons were pressed, the analog stick was not moved.
93 READ: 0x74 ACK 0x7F ACK 0x7B ACK 0x20 ACK 0x7D ACK 0xC7
97 wii_nunchuk_data_left.sr
98 ------------------------
100 No buttons were pressed, the analog stick was moved to the left.
105 READ: 0x12 ACK 0x7C ACK 0x48 ACK 0x2C ACK 0x97 ACK 0x2F
110 wii_nunchuk_data_right.sr
111 -------------------------
113 No buttons were pressed, the analog stick was moved to the right.
118 READ: 0xD6 ACK 0x61 ACK 0x4E ACK 0x28 ACK 0x93 ACK 0x2B
123 wii_nunchuk_data_top.sr
124 -----------------------
126 No buttons were pressed, the analog stick was moved to the top.
131 READ: 0x74 ACK 0x7E ACK 0x8E ACK 0x70 ACK 0x48 ACK 0x97
136 wii_nunchuk_data_bottom.sr
137 --------------------------
139 No buttons were pressed, the analog stick was moved to the bottom.
144 READ: 0x75 ACK 0x19 ACK 0x43 ACK 0x2F ACK 0x65 ACK 0xA3
149 wii_nunchuk_button_c.sr
150 -----------------------
152 The C button was pressed.
157 READ: 0x75 ACK 0x7F ACK 0x70 ACK 0x56 ACK 0x9F ACK 0xED
162 wii_nunchuk_button_z.sr
163 -----------------------
165 The Z button was pressed.
170 READ: 0x75 ACK 0x7F ACK 0x80 ACK 0x78 ACK 0x64 ACK 0x6C
175 wii_nunchuk_orientation_vertical_top.sr
176 ---------------------------------------
178 The Nunchuk was in vertical ("normal") position.
183 READ: 0x75 ACK 0x7F ACK 0x81 ACK 0x78 ACK 0x63 ACK 0x5F
188 wii_nunchuk_orientation_vertical_bottom.sr
189 ------------------------------------------
191 The Nunchuk was in vertical position, help upside-down.
196 READ: 0x75 ACK 0x7F ACK 0x71 ACK 0x83 ACK 0x5D ACK 0xD3
201 wii_nunchuk_orientation_horizontal_left.sr
202 ------------------------------------------
204 The Nunchuk was in horizontal position, pointing to the left.
209 READ: 0x75 ACK 0x7F ACK 0x25 ACK 0x7E ACK 0x7B ACK 0xEB
214 wii_nunchuk_orientation_horizontal_right.sr
215 -------------------------------------------
217 The Nunchuk was in horizontal position, pointing to the right.
222 READ: 0x75 ACK 0x7F ACK 0x8F ACK 0x7E ACK 0x75 ACK 0x4B
227 wii_nunchuk_init_reg_3xdata.sr
228 ------------------------------
246 READ: 0x75 ACK 0x7F ACK 0x77 ACK 0x4F ACK 0x82 ACK 0x3B
250 (for the above values, no button was pressed)
261 READ: 0x75 ACK 0x7F ACK 0x75 ACK 0x44 ACK 0x82 ACK 0x34
265 (for the above values, the Z button was pressed)
275 READ: 0x75 ACK 0x7F ACK 0x77 ACK 0x43 ACK 0x83 ACK 0x5D
279 (for the above values, the C button was pressed)