Teensy 3.0 Wire Library with BMP085

I’m having problems getting correct data from the I2C BMP085 pressure sensor. I’ve established communication and getting data back, but the data values are incorrect. I’ve seen several other posts from people getting similar problems with negative altitude readings and temperature values that are way off. My problems seem to be related to the calibration data as opposed to the temp/pressure reading data. If I hardcode calibration data, I get more reasonable (but still wrong) pressure and temperature readings.

My Sketch and results are working fine on an Arduino Pro Mini, but does not port to the Teensy 3.0. I’m using the same sensor on both so it is not sensor related.

One hardware question I have is could the SCL/SDA pullup be different because of the Mini54 in the Teensy design. But, I assume that would screw up the clock and I would not get any data.

I thought perhaps this could be 7 bit vs 8 bit addressing but if that we the case, I would not get anything either.

I have increased the delays on the read pressure and read temperature functions, with no success. I have also added delays to the inintialization of the BMP085 - just in case the Teensy is ready before the sensor.

So, I think it could to be related to the Wire library. Anyone have similar issues?

In looking through the code it’s probably related to the 8bit vs 32bit. I’m still looking…

Yup. That was it.

Reading a 16bit signed calibration value from the BMP085 into a 32bit int.