Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Anyone ever read from I2C on RoboRio? (http://www.chiefdelphi.com/forums/showthread.php?t=154704)

ericalbers 04-02-2017 09:10

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

axton900 04-02-2017 13:19

Re: Anyone ever read from I2C on RoboRio?
 
Here's an example of our team using a Rioduino using I2C from our repo:
https://github.com/FRC-Team-1403/RioDuinoIMUCode

If you have any questions about this, feel free to PM me.


All times are GMT -5. The time now is 00:12.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi