Hardware Reference
In-Depth Information
Encryption
The Nunchuk is designed to provide an encrypted link. However, that can be disabled by
initializing it a certain way. 60 The defeat procedure is as follows:
1.
Write 0x55 to Nunchuk location 0xF0.
2.
Pause.
3.
Write 0x00 to Nunchuk location 0xFB.
The following illustrates the message sequence involved. Notice that this is
performed as two separate I2C write operations:
Write
Pause
Write
F0
55
-
FB
00
Once this is successfully performed, all future data is returned unencrypted.
Read Sensor Data
The whole point of the Nunchuk is to read its sensor data. When requested, it returns 6
bytes of data formatted as shown in Table 3-4 .
Table 3-4. Nunchuk Data
Byte
Bits
Description
1
Analog stick x axis value
2
Analog stick y axis value
3
X acceleration bits 9:2
4
Y acceleration bits 9:2
5
Z acceleration bits 9:2
6
0
Z button pressed (active low)
1
C button pressed (active low)
3:2
X acceleration bits 1:0
5:4
Y acceleration bits 1:0
7:6
Z acceleration bits 1:0
 
 
Search WWH ::




Custom Search