flrrth / pico-bmp280

This is a MicroPython library for the Raspberry Pi Pico and allows communicating with the BMP280 pressure sensor through the SPI and I2C protocols.
GNU General Public License v3.0
8 stars 0 forks source link

various errors when trying to start the I2C example #7

Open TheRealOtto opened 1 year ago

TheRealOtto commented 1 year ago

Raspberry Pi Pico connected via USB and opened in Thonny. Files were unchanged and copied to the Pico.

1: with line 4 in I2C example (from README.md) being from bmp280 import BMP280I2C

following error is shown: Traceback (most recent call last): File "stdin", line 4, in module ImportError: can't import name BMP280I2C

  1. when changing line 4 to from bmp280_i2c import BMP280I2C

following errors pop up: Traceback (most recent call last): File "stdin", line 9, in module File "bmp280_i2c.py", line 13, in init File "bmp280.py", line 13, in init File "bmp280.py", line 83, in configuration File "bmp280.py", line 88, in reset File "bmp280_i2c.py", line 17, in _write OSError: [Errno 5] EIO

Is the problem between this user's ears? PS: brackets for stdin and module removed. Underlines for init do not show.

drybinski commented 12 months ago

Same problem here - does not work at all.

@TheRealOtto Did you find another solution (lib)?

devilnest commented 2 months ago

@TheRealOtto check address of your BMP280 Address of my device is 118 -> 0x76 To find address you can use this code: ` hpa_i2c = machine.I2C(1, scl=machine.Pin(7), sda=machine.Pin(6), freq=200000) bmp280_device = hpa_i2c.scan() print(bmp280_device)

` Note: i2c.scan() returns a List of int;

image