TeensyDigital
Well-known member
I've got three sensors on my I2C bus that use three different libraries. I am trying to optimize every microsecond on the read/write speed and I noticed a considerable difference in one of the sensors when it runs stand-alone vs. running after one of the other two had been initialized. The libraries for two of the sensors use Wire and the third uses I2Cdev. The I2Cdev sensor read time increases 4X if I initialize either of the two wire sensors first (even though the wire sensor traffic is 100% idle).
Is it bad form to run I2Cdev and Wire libraries in the same sketch? I can easily rewrite the I2Cdev library (or the other two libraries to I2Cdev), but before I do I thought i'd check with the brain trust. These libraries have been operating just fine together, but there is a 1300 microsecond difference in read time when Wire is fired up with I2Cdev.
For reference I'm running my bus at 400Khz using an ADXL375, a LSM6DSO32 IMU, and a MS5607 pressure sensor.
Thanks,
Mike
Is it bad form to run I2Cdev and Wire libraries in the same sketch? I can easily rewrite the I2Cdev library (or the other two libraries to I2Cdev), but before I do I thought i'd check with the brain trust. These libraries have been operating just fine together, but there is a 1300 microsecond difference in read time when Wire is fired up with I2Cdev.
For reference I'm running my bus at 400Khz using an ADXL375, a LSM6DSO32 IMU, and a MS5607 pressure sensor.
Thanks,
Mike