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

various errors when trying to start the I2C example #7

Open
TheRealOtto opened this issue Feb 20, 2023 · 2 comments
Open

various errors when trying to start the I2C example #7

TheRealOtto opened this issue Feb 20, 2023 · 2 comments

Comments

@TheRealOtto
Copy link

TheRealOtto commented Feb 20, 2023

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

Same problem here - does not work at all.

@TheRealOtto Did you find another solution (lib)?

@devilnest
Copy link

@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

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

3 participants