7 years, 2 months ago.

any reason why the kl25z I2C would stop working with more than one attached device?

I have two sensors which both work via I2C, and with libraries to make access easy. One library written by me and one slightly modified by me. Separately they work fine. However when both are enabled and running, after the initial initialization phases, the I2C interface appears to pack up; neither sensors return an ACK to the slave address write step.

The two libraries are here: https://developer.mbed.org/users/UHSLMarcus/code/AMS_CCS811_gas_sensor/ https://developer.mbed.org/users/UHSLMarcus/code/BME680/

Example of how I am trying to use them:

Import programsensors_test

demo of using 2 sensors on I2C on kl25z

example output

starting....
sensors started 
bme.isNewData: 0, ccs811.has_new_data: 0 
Error count: 0
BME680 addr write failed (read)
bme.isNewData: 0, ccs811.has_new_data: 0 
Error count: 1
(10) Failed to write slave write address
BME680 addr write failed (read)
bme.isNewData: 0, ccs811.has_new_data: -1 
Error count: 1
(10) Failed to write slave write address
BME680 addr write failed (read)
Be the first to answer this question.