Go to Post Mentor: How is that held in place? CAD Lead: Go to the hardware store and buy a bag of constraints and put the constraints on the robot. - Kenyow [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #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
  #2   Spotlight this post!  
Unread 04-02-2017, 13:19
axton900's Avatar
axton900 axton900 is offline
Programming Co-Captain
FRC #1403 (Cougar Robotics)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2015
Location: New Jersey USA
Posts: 52
axton900 has a spectacular aura aboutaxton900 has a spectacular aura aboutaxton900 has a spectacular aura about
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.
__________________
Team 1403: Cougar Robotics (2015 - present)

Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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