View Single Post
  #1   Spotlight this post!  
Unread 04-02-2017, 09:10
ericalbers ericalbers is offline
Registered User
no team
 
Join Date: Feb 2015
Location: earth
Posts: 8
ericalbers is an unknown quantity at this point
Anyone ever read from I2C on RoboRio?

Hello,
Trying to read data from I2C rioDuino board, only getting buffer underruns on every ReadOnly call.

We setup a connection with
I2C con = new I2C(I2C.Port.kMXP,0x51);

then do a
con.readOnly(fromarduino,11);

And every time it gets a buffer underrun,
the read is in a loop and I catch the exception, it never sees any data

On the arduino side we do a
Wire.begin(0x51)
while(true)
{
Wire.beginTransmission(0x51)
Wire.write("arduinodata");
Wire.endTransmission();
delay(1000);
}

Again, never see any data on the rio, googleing around I cannot find a single example where anyone has ever read data from a connected device on the MXP...? Is this a fault in the WPILib?

We ARE able to send data TO the arduino over the same interface btw

Thanks
Reply With Quote