Thank you for providing this library to the Arduino comunity, i enjoy it;
I was playing with it in a multiple sensor system and could not "change the address" of the device without error.
I have manage to solve the issue by adding the line :
_i2caddress = new_address;
just after :
uint8_t VL6180x::changeAddress(uint8_t old_address, uint8_t new_address){
//NOTICE: IT APPEARS THAT CHANGING THE ADDRESS IS NOT STORED IN NON-VOLATILE MEMORY// POWER CYCLING THE DEVICE REVERTS ADDRESS BACK TO 0X29
Hello,
Thank you for providing this library to the Arduino comunity, i enjoy it;
I was playing with it in a multiple sensor system and could not "change the address" of the device without error. I have manage to solve the issue by adding the line :
_i2caddress = new_address;
just after : uint8_t VL6180x::changeAddress(uint8_t old_address, uint8_t new_address){
//NOTICE: IT APPEARS THAT CHANGING THE ADDRESS IS NOT STORED IN NON-VOLATILE MEMORY // POWER CYCLING THE DEVICE REVERTS ADDRESS BACK TO 0X29
if( old_address == new_address) return old_address; if( new_address > 127) return old_address;
VL6180x_setRegister(VL6180X_I2C_SLAVE_DEVICE_ADDRESS, new_address);
in the file VL6180X_WE.cpp
Best regards.
Bruno