riftware
31-01-2014, 15:07
Ok - I've tried searchng a bit on the topic of i2c with the CRIO - most of the results come up in conjunction with talking to an arduino and/or a PI. Those posts gave me a clue but I need some additional data. We have the SRF02 ultrasonic which is an i2c device. I can see the device just fine on my raspberry PI which according to i2cdetect has it at 0x70. Below are my questions or statements (which may need correcting)
1: 0x70 on the PI's i2c bus would be addressed as E0 on the crio due to the need to bit shift 1 left correct?
2: Do I only need to worry about that on the address of the device? OR do I need to perform a similar operation on the command register which sends a ping?
3: Do I need to do the revers of that on values I retrieve from the device once I get the data back on the cRio?
I2c work fine on my PI and my arduino but have been kind of crappy on the CRio. One other tidbit that may be effecting that is in reviewing the specs on the sidecar it looks like they already have pullup resistors on the i2c port where I've been putting them on my sensor spoke probably unecessarily. We were looking at 4 ultrasonics (collision avoidance) and the accelerometer on the i2c bus so we have a single hub that they all connect to.
Any insight is appreciated!
1: 0x70 on the PI's i2c bus would be addressed as E0 on the crio due to the need to bit shift 1 left correct?
2: Do I only need to worry about that on the address of the device? OR do I need to perform a similar operation on the command register which sends a ping?
3: Do I need to do the revers of that on values I retrieve from the device once I get the data back on the cRio?
I2c work fine on my PI and my arduino but have been kind of crappy on the CRio. One other tidbit that may be effecting that is in reviewing the specs on the sidecar it looks like they already have pullup resistors on the i2c port where I've been putting them on my sensor spoke probably unecessarily. We were looking at 4 ultrasonics (collision avoidance) and the accelerometer on the i2c bus so we have a single hub that they all connect to.
Any insight is appreciated!