Replies: 2 comments 3 replies
-
Why not just creating a different driver with a different index, a different USE_xxx |
Beta Was this translation helpful? Give feedback.
-
I found an mistake in code for sensor "xsns_109_sgp4x.ino"
Means in line 268 and 270. So it shows SGP41 when having an SGP40 and the other way round. |
Beta Was this translation helpful? Give feedback.
-
I added support for the SGP41 VOC/NOx sensor to Tasmota (development...precurse:Tasmota:sgp41)
It uses the official Sensirion driver, which is more up-to-date compared with the previous Adafruit SGP40 driver. It works well, but requires recompilation to support it at this time. The issue is that both the SGP40 and SGP41 use the same I2C device identifier, and I don't know of a way to detect it. I've tried to first detect the SGP40, by connecting to it (see below), then run an I2C command. If that command fails, then I want it to fallback to the SGP41. However, if I try it this way, the whole I2C bus craps out and my GPIO configuration resets to "None". I assume it has to do with the 2 calls to
sgp40.Begin(Wire)
and thensgp41.Begin(Wire)
a few lines after that.If anyone has an idea of how I can handle this, it would be appreciated. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions