Expansion Board i2c and Pin 10
i have a expansion board 3 and a lopy4. I want to connect a BME280 to it. I have the libary and it works. But only for a few minutes, then i get a I2C Bus error. This is the libary: https://github.com/robert-hh/BME280
And this my code:
from machine import I2C from bme280 import * from utime import sleep i2c=I2C(I2C.MASTER,pins=('P8','P9')) print(i2c.scan()) bme280 = BME280(i2c=i2c) while True: print(bme280.values) sleep(10)
Where is Pin 10? Because it is said to be default for i2c but i can find it. Is it the user button?How do you connect it? Do you know where the I2C Bus error comes from?
@robert-hh hi, thanks very much, i think updating did the thing. Works now fine.
robert-hh last edited by
@Flo-Gritsch I uswed that sensor with Pycom boards pretty reliable. So it may be a wiring problem. It that permanent?
so if you put that sensor reading into a try/except clause and ignore the error, does the next read attempt work?
P.S.: In the picture you wired the sensor already to P9 and P10. So the code and the picture to not match. P8 is used by the SD card as well. And you use a pretty old version of the LoPy4 firmware. An update may help.
thanks! found pin 10. But still get the error:
connected the sensor directly to the pycom without the breadboard. Any other ideas?
livius last edited by
Where is Pin 10?
where the I2C Bus error comes fro
look at wires, as breadboard is many times not good.
here is the i2c bus error