Asked — Edited
Resolved Resolved by DJ Sures!

I2c To Uart Converter For Two-Way Kangaroo Communication With The V3

I'm starting a new thread based on a suggestion by Robotdoc on another thread to use a breakout board from spark fun as a way to work around the challenge of needing two way communication between the v3 and the dimension engineering kangaroo but only having one way communication natively.

I did some research and bought this module for $16

http://sandboxelectronics.com/?product=sc16is750-i2cspi-to-uart-bridge-module

Do you think this will be a viable workaround?

Matt

User-inserted image


ARC Pro

Upgrade to ARC Pro

Stay at the forefront of robot programming innovation with ARC Pro, ensuring your robot is always equipped with the latest advancements.

#2  

I haven't attempted a connection using the I2C port on a V3 yet so there is no experience gained as to how the interface may work. I suspect some testing will be involved and feedback will follow after some users attempt this possible solution.

PRO
Synthiam
#3  

In theory that module will work - but the example code isn't a great implementation of converting between connection types (uart and i2c). The example only requests for incoming data from the UART one byte at a time. You're only able to query if there is a byte in the input register. The input register is 1 byte.

So if two or 3 or 20 bytes came into the module, the only byte in the input buffer is the first byte. The rest get lost....

Since it's Arduino, I would recommend researching on how to use the UART Receive Interrupt. And therefore create an array variable which would be a buffer for incoming data. The interrupt would append incoming data to the array.

Then, in i2c - you would have a read register that returns how many bytes are available. And another read register to read each byte.

It's actually not complicated as it sounds... But the library would need to be rewritten for that piece of hardware. It's doable

#4  

Thank you DJ, I appreciate the in depth response. One thing I didn't realize is that this board is also shipping from china so depending on when my v4 ships it could be a fix for a solved problem. In the meantime I'm going to look more into the code while making sure my encoders are correct. I thought I was pretty close but there is always some hurry up and wait component of the project. Thanks again, I'll keep you posted. Matt