Quote:
Originally Posted by Dave Flowerday
The only issues we had with this were:
1) The I2C driver in WPIlib forces you to use a certain I2C "protocol" where the register address is always sent and then you can read or write up to 4 bytes. I would have preferred if it didn't impose this register address protocol on us (there's no reason in our application that we couldn't have issued a read without first writing a register address). This wouldn't impact you though since the Devantech sensors appear to use this fairly-standard protocol.
|
The API to the FPGA was designed this way to make it easy to interface with sensors that use this register type of API. In fact, every sensor we tested with used this type of API. It is our intention to make it more flexible in the future.
Quote:
Originally Posted by Dave Flowerday
2) The I2C pullups in the digital sidecar were not sufficient to overcome the electronic noise on the robot. The sidecar uses the recommended value (3.6Kohm if I remember correctly). When we first tried our setup with those default values, we were getting corrupted readings a large percentage of the time (or the sensor wouldn't hear its own address because that was corrupted and it would simply not respond). We added an external 1Kohm parallel resistor to our SDA and SCL lines to increase the drive current (after checking the datahseets for the parts used inside the sidecar to make sure this wouldn't cause any issues) and that almost eliminated the problem. After that, once every few seconds we'd get a bad reading but mostly it was fine. It's possible this could have been your problem, but I'd have to hear more about what exactly happened when you hooked up both sensors to know for sure.
|
Did you try shielding the cable? By adding stronger pulls, you can cause problems with other sensors that can't pull the bus to ground. The most egregious are the hi-technic NXT sensors. They actually have series resistors on the bus making them pretty weak at pulling the bus low.