bmp180

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
bellad
Posts: 96
Joined: Tue May 14, 2019 1:47 pm

bmp180

Post by bellad » Tue Nov 12, 2019 2:16 pm

hello,
i try read a bmp180 , i downloaded bmp180.py

Code: Select all

from bmp180 import BMP180
from machine import I2C, Pin                        
bus =  I2C(scl=Pin(4), sda=Pin(5), freq=100000)
with i2c.scan() = [118]
i have changed , in bmp180.py ,

Code: Select all

_bmp_addr = 119
by

Code: Select all

_bmp_addr = 118
but

Code: Select all

bmp180 = BMP180(bus)

Code: Select all

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "bmp180.py", line 22, in __init__
OSError: [Errno 19] ENODEV
I do not understand why
can you help please

User avatar
ghayne
Posts: 42
Joined: Sat Jun 08, 2019 9:31 am
Location: Cwmllynfell, Wales

Re: bmp180

Post by ghayne » Tue Nov 12, 2019 2:21 pm

I looks like your BMP180 is not connected properly, check the wiring.

bellad
Posts: 96
Joined: Tue May 14, 2019 1:47 pm

Re: bmp180

Post by bellad » Tue Nov 12, 2019 2:25 pm

i think of yes , because with i2c.scan() = 118

User avatar
ghayne
Posts: 42
Joined: Sat Jun 08, 2019 9:31 am
Location: Cwmllynfell, Wales

Re: bmp180

Post by ghayne » Tue Nov 12, 2019 2:41 pm

I think
I2C(scl=Pin(4), sda=Pin(5), freq=100000)

should be
I2C(scl=Pin(5), sda=Pin(4), freq=100000)

Garry

bellad
Posts: 96
Joined: Tue May 14, 2019 1:47 pm

Re: bmp180

Post by bellad » Tue Nov 12, 2019 2:51 pm

ok i put I2C(scl=Pin(5), sda=Pin(4), freq=100000)

same error

bellad
Posts: 96
Joined: Tue May 14, 2019 1:47 pm

Re: bmp180

Post by bellad » Tue Nov 12, 2019 3:02 pm

it's ok , i download for bme280 :
it's good
thank you

Post Reply