I have successfully installed the Bosch SDK and Sparkfun library for the BMV080 sensor, and have successfully run the ‘Basic Readings’ example firmware supplied using an ESP32-S3. However, I’m having some trouble trying to run more than one sensor on the i2c bus. I have changed the address of the second sensor as per instructions, and have run the ‘Two Sensors’ example supplied. The example appears to run correctly, but on closer inspection it looks like only one of the sensors actually gets read. This is most obvious when obstructing one or other sensor and looking for the warning flag with the measurement. When one sensor is covered, there is no flag, and when the other is covered, both sensor measurements are flagged. I looked at the i2c bus with a logic analyser, which confirmed that only one address (the last one configured in the library) was being used. I kind of seems like the BMV080 class can’t cope properly with having multiple instances. The only way around it I have found is based on using the supplied ‘Open Close’ firmware example. With this method I was able to open, read, and close each sensor one at a time, so only one instance of the BMV080 class is ever operational. This method unfortunately is very slow as the sensor has to be reinitiated every time it is read. I was wondering if anyone else has seen this problem, and if there is a better solution.
You’ll likely need to disable one sensor’s i2c pull-up resistors
You’ll just need to sever the trace I’ve circled below with an exactor knife or similar on 1 and only one board (though you can always replace the connection by placing a solder blob there to reconnect the pads)
If that doesn’t help with the bus situation, the S3 is a dual-core processor…you could ostensibly whip up some code that runs one on each, or alternately fills a buffer, etc
Thanks for the response. The problem isn’t the i2c pull-up resistors as I have dealt with those already and am able to communicate with two devices one the same i2c bus so long as I close and reopen the BMV080 library class instance each time I change device. The idea of running one set of code and library class on each core is interesting, but when I tried this it the code just seemed to crash as though the BMV080 library class didn’t like being run that way. I wondered if there was a chance of getting another SparkFun example for two BMV080 devices on one i2c bus that is tested and known to be working properly so I could work from that?