Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Troubles reading temperature #9

Open
lucasvinals opened this issue May 28, 2019 · 1 comment
Open

Troubles reading temperature #9

lucasvinals opened this issue May 28, 2019 · 1 comment

Comments

@lucasvinals
Copy link

lucasvinals commented May 28, 2019

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
Copy link

timm-zz commented Aug 2, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants