T
Serial.println() inside requestEvent() always fails, even with NUL str, Serial.println("").
root@Omega-745F:~# i2cdump -y -r 0x30-0x32 0 0x09 b
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
30: 0c XX 0c ?X?
where as Serial.println() inside receiveEvent() can print one or two characters, for eg,
void receiveEvent() {
reg = Wire.read();
Serial.println(reg, HEX);
}
to a certain volume of data.
root@Omega-745F:~# i2cdump -y -r 0x30-0x32 0 0x09 b
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
30: 30 31 32 012
root@Omega-745F:~# i2cdump -y -r 0x30-0x3F 0 0x09 b
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
30: 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f 0123456789:;<=>?
root@Omega-745F:~# i2cdump -y -r 0x40-0x4F 0 0x09 b
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
40: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f @ABCDEFGHIJKLMNO
root@Omega-745F:~# i2cdump -y -r 0x30-0x41 0 0x09 b
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
30: XX 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f X123456789:;<=>?
40: 40 41 @A
If there is more data, it fails..
root@Omega-745F:~# i2cdump -y -r 0x30-0x45 0 0x09 b
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
30: XX 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f X123456789:;<=>?
40: 40 41 42 00 00 00 @AB...
root@Omega-745F:~# i2cdump -y -r 0x30-0x4F 0 0x09 b
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
30: 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f 0123456789:;<=>?
40: 40 41 00 00 00 00 02 XX 00 00 00 00 00 00 00 24 @A....?X.......$
It fails every time if a long str such as "Hello, World!" is to be printed, even inside receiveEvent().
It is not a problem associated with ARD Dock; I am not using ARD Dock at all..
Thanks..