pycom / pycom-micropython-sigfox

A fork of MicroPython with the ESP32 port customized to run on Pycom's IoT multi-network modules.
MIT License
200 stars 166 forks source link

MPL3115A2 I2C bus error #282

Open BouTayehGaby opened 5 years ago

BouTayehGaby commented 5 years ago

I was setting 20 Pysens sensors to eventually deploy them and collect some data. I used the Pycom libraries to read sensor measurements. Everything was going alright for the first 7 sensors. However, when I tried to configure the 8th an error occurred:

--> File "/flash/lib/MPL3115A2.py", line 60, in init OSError: I2C bus error.

I used the same code for all the sensors, I only changed the Devaddr, the network session and app session keys. Did not touch anything else. It is weird that the library is working fine for one Pysens and suddenly it generates an error for another.

I put this Pysens away and tried to configure a new one. Same problem! I thought it was a firmware issue. I updated the LoPy4 but nothing changed. Still have the same error.

Can somebody help me out with this one?

Thank you

svonbentzel commented 5 years ago

I had the same problem with the MPL, I have solved with a time.sleep(3) before and after the read command.

In my case this solved the problem !