![]() |
I2C Rangefinders not working
We are using maxbotics mb1212 I2C rangefinders and we have tested our rangefinders on an arduino but for some reason, the same approach to reading off the sensors seems to fail. I think our issue may be that it can't find the sensors, which it should totally be able to do, or that it has trouble accessing the command on the sensors. The documentation for the rangefinders is right here http://www.maxbotix.com/documents/I2..._Datasheet.pdf
,as well our Rangefinder code: Quote:
|
Re: I2C Rangefinders not working
Quote:
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. |
Re: I2C Rangefinders not working
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. |
Re: I2C Rangefinders not working
Quote:
Quote:
|
Re: I2C Rangefinders not working
Quote:
Quote:
|
Re: I2C Rangefinders not working
Quote:
|
Re: I2C Rangefinders not working
Quote:
I left them installed on the network when I moved to the roboRIO and they worked with both the main and MXP I2C ports. I had a scope on them at some point and the roboRIO drove the lines low enough. Somehow I missed the users manual so thanks for the link. |
| All times are GMT -5. The time now is 10:50. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi