Skip to content

Troubles reading temperature #9

@lucasvinals

Description

@lucasvinals

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions