micropython-bmp180 icon indicating copy to clipboard operation
micropython-bmp180 copied to clipboard

Troubles reading temperature

Open lucasvinals opened this issue 6 years ago • 2 comments

Hi, first of all, excelent library! Helps a lot to get started with MicroPython and the ESP8266...

For some reason, I'm having troubles to make this work...Whenever I read temperature, I get the following error:

>>> bmp.temperature Traceback (most recent call last): File "<stdin>", line 1, in <module> File "bmp180.py", line 141, in temperature ZeroDivisionError: divide by zero

The problem is in line 141, inside temperature method, which is: X2 = self._MC*2**11/(X1+self._MD)

that (X1+self._MD) is equal to zero, then it breaks the division...

I would appreciate it greatly if you could help me to identify that reading problem

Thanks again,

Luke

lucasvinals avatar May 28 '19 04:05 lucasvinals

I encountered the same problem. Have you solved this problem?

timm-zz avatar Aug 02 '20 04:08 timm-zz