I am currently in the process of 'attempting' to make the crazyflie semi autonomous and I have a quick question to ask. I was planning to implement a few IR sensors on the crazyflie and interface them with I2C. I have some background with I2C and I understand that you can interface the SDA and SCL lines with multiple peripherals in parallel, each with different addresses. But lets assume that I want to use 4 of the same senors, all with the same address. How do I work around this without having the same addresses interfere with each other?
Also, I was looking at the schematic provided on the bitcraze website and noticed that the SCL and SDA pins on the expansion header already have the pull up resistors to VCC. I just want to confirm that this indeed correct before I start hitting my head against the wall.
I don't have much experience with this but I'm just looking at this from a programming point of view thinking it wouldn't be possible with the same addresses as communication would collide.
Maybe some extra hardware to ensure only one sensor is connected to the bus at any time.. Do you know if the manufacturer offers different models, that could be a easier way around. The main problem I see is that I think these addresses are not configurable inside the sensors.
SpilledMyCatNip wrote:
lets assume that I want to use 4 of the same senors, all with the same address. How do I work around this without having the same addresses interfere with each other?
-Peter
You would need extra hardware to enable only one sensor on the bus at one time, to prevent bus contention.