Go to Post I have a feeling this is going to be a really good year.:) - Richard Wallace [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Spotlight this post!  
Unread 01-04-2015, 10:53
2538Programming 2538Programming is offline
Registered User
FRC #2538
 
Join Date: Dec 2013
Location: Morris MN
Posts: 3
2538Programming is an unknown quantity at this point
Re: I2C Rangefinders not working

Quote:
Originally Posted by Jefferson View Post
Do you have pull down resistors on the data and clock wires? I believe the arduinos have them built into the board while the roborio needs them added to the bus.
We are using a similar sensor. I'd be happy to send you our C++ library for it.
Also, be careful if you are usng more than one. They can interfere with each other if the readings are sequenced properly.
We have resisters going from 3.5/5 V to SCL and SDA. We are using three of the rangefinders but I am pretty sure they are wired correctly as we were able to get all three values from the Arduino. If you are willing to send me your library, I would love to check it out, thanks!

Quote:
Originally Posted by JDNovak View Post
For the RoboRio, the I2C library changed to 7 bit addressing so the range is 1 to 128 instead of 2 to 254. The default address is 112 to the RoboRio.

The Arduino library uses 8 bit addressing.

I don't think this is officially documented anywhere.

For example I used the Arduino example code to set the address to 4 and then accessed the sensor on address 2 from the RoboRio.

The clock and data do need external 120 ohm pullups also.
This might be the issue, our sensors are addressed at 200, 202, and 204. I will try changing those and get back to you guys. Thanks for responding, I would have never been able to figure that out, why on earth would they do that?
Reply With Quote
 


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 12:33.

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