sparkfun / BMP180_Breakout

Breakout board for the Bosch BMP180 barometric pressure sensor
Other
69 stars 101 forks source link

Having both .startTemperature and .startPressure open at the same time #6

Closed philipgroet closed 9 years ago

philipgroet commented 9 years ago

Hi, I found a little annoyance in this library, when you have both startTemperature and startPressure active, the getTemperature and the get getPressure method output weird values. Maybe usefull to not in the documentation that this isn't possible. Regards

ToniCorinne commented 9 years ago

Can you give us some more information about the issue you're finding? Are you using the default sketches or have you modified them somehow?

mgrusin commented 9 years ago

It makes sense that you'd get weird values; the part only supports reading the pressure or temperature at any given time. I think this is clear in the example code, but I'll look again and see if there's a place to specifically warn against this. Thanks for the report!

JJAU-PTY commented 9 years ago

You need to start a reading, use delay (status), then again get the reading with the delay (status) condition. That way it will get the right reading. I learned that the hard way.