micropython-IMU / micropython-bmp180

micropython-bmp180 is a module for micropython which provides a class for the BMP180 pressure sensor
MIT License
85 stars 38 forks source link

Troubles reading temperature #9

Open lucasvinals opened 5 years ago

lucasvinals commented 5 years ago

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

timm-zz commented 4 years ago

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