How does dtoverlay support for sensors handle i2c address duplicates?
Posted: Fri Aug 07, 2020 3:56 am
How does dtoverlay support for sensors handle i2c address duplicates? I say duplicates because I have a scenario where Pi A may have a SI7020 sensors and Pi B may have a HTU21D sensor. Both of these sensors use the same i2c address, which is 0x40.
I would like to have one consistent config.txt file, across all Pi devices if possible. So the dtoverlay configuration as follows is the desired result such that on Pi A and Pi B...
But I suspect what I have to do is...
Pi A...
Pi B...
It would be nice if the dtoverlay logic was smart enough to only use the actual entry that is applicable, I hope this is actually the case.
I would like to have one consistent config.txt file, across all Pi devices if possible. So the dtoverlay configuration as follows is the desired result such that on Pi A and Pi B...
Code: Select all
dtoverlay=i2c-sensor,si7020,addr=0x40
dtoverlay=i2c-sensor,htu21,addr=0x40
Pi A...
Code: Select all
#dtoverlay=i2c-sensor,si7020,addr=0x40
dtoverlay=i2c-sensor,htu21,addr=0x40
Code: Select all
dtoverlay=i2c-sensor,si7020,addr=0x40
#dtoverlay=i2c-sensor,htu21,addr=0x40