2017-07-23 07:03 AM
I am working with the VL6180x and I would like to connect multiple sensors via an expansion board by ST (*). Therefore I want to communicate to single sensors, so I have to change each single I2C-Device-Address via the 0x212 register. My method is contacting the first sensor via the standard value 0x29 and changing its address. Then I connect the second sensor who still has the 0x29 address and thus I change this one's address, too, and so on.... The problem is: As soon as the whole device is unplugged from my PC, the addresses become reset and hence I'd have to do the whole procedure with plugging in each sensor one by one again. Is there a better method for contacting single sensors?
I am not working with the API by ST, but I am just contacting the I2C registers listed in the data sheet.
(*) The board used is the X-NUCLEO-6180XA1
#sensor #multiple #vl6180x2017-07-25 11:25 PM
Hello,
You are right, the device address register gets reset during a power on. This needs some further clarification from ST, how are the devices supposed to work on the same. Looking at the
http://www.st.com/en/ecosystems/x-nucleo-6180xa1.html
page, it specifically mentions stacking up up to 3 boards to the same host.Meanwhile I tried to google for a solution and have a look here:
https://learn.sparkfun.com/tutorials/vl6180-hookup-guide/discuss
Other temporary solution might be using different I2C buses (if available) on your microcontroller.
Hope this helps,
David
2017-08-16 07:26 AM
Hey,
I soluted it by using the GPIOs. Therefore I only activate one sensor and keep the other one in HW reset. After changing the address of the first one, I move on to the second one and so on...