Quote:
Originally Posted by Jefferson
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
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?