I²C Interface
The I²C implementation on the Robo TX controller --starting Robo Pro 3.1.3-- is easy to use, especially when an I²C driver is provided, works fine and is reliable.
|
• WARNING AND DISCLAIMER |
Robo Pro side
|
Arduino side
|
Reading data requires two steps:
Requesting directly the data with specifying the register or the command at the same time doesn't work with Arduino. The two steps approach fixes this issue. |
Arduino receives the command:
command = Wire.read(); switch (command) { case 0x56: // version Serial.println("< version"); break; } Arduino sends the data:
switch (command) { case 0x56: // version buffer.i16[0] = 0x0208 Wire.write(&buffer.i8[0], 2); break; } |
Speed with Arduino is limited at 100 kHz.
Learn more about the I²C functions is available at How to Manage an I²C Device? |
Previous |