Problems with intermittent I2C operation using Unihiker and BME280
I am having a problem with intermittent operation using I2C on the Unihiker. To try out I2C I used the 5-06-bme280.py example code from the /usr/local/lib/python3.7/dist-packages/pinpong/examples directory. Sometimes it works for a while but it fails with an index out of range error from a function within the dfrobot_bme280.py library. Most of the time it fails at start of execution with an “Analog map retrieval timed out” error.
These errors occur if I run from Mind+ or Jupyter Notebook and even directly from the Program menu on the Unihiker.
Am I running the correct firmware and software?
Here is a successful start of a run
Until it has the list index out of range error
(I had copied the code into “main.py” so the file name is incorrect).
Make sure you are using the correct I2C address for the BME280 sensor. Verify the address with an I2C scanner script.
lia.ifatIt is using the correct address (0x76) as it does work some of the time as you can see from my first post. And I did verify it with a scanner. One thing that I did notice is that the Linux i2c-tools utility doesn't seem to work as it shows lots of devices that I know are not present.