I am trying to connect two VL53L8CX time of flight sensors to STM32F401RET6. I need one I2C bus for both sensors but unable to assign slave address dynamically. I need to know where to modify the program in stm32cube IDE
I am actually using X-NUCLEO-53L8A1 expansion boards. Only one board can be Active at a time on the bus[power enable and LPN pins]. The second sensor will not be initialized without shutting the first one. We did try what you suggested but it did not...
for(int i=0;i<2;i++) { if(i==0) { shut_sensor2(); // reset LPN pin of sensor2 Resetsensor1(); // reset and set LPN of sensor1 Hardware_Init(&App_Config[i]); if ((vl53lmz_set_i2c_address(&(App_Config[i].ToFDev),0...