Closed clovisf closed 2 weeks ago
Sensirion does not make an SGP30 with address 0x59. The SGP40 has address 0x59. But it might be some kind of counterfeit. See https://forum.arduino.cc/t/cjmcu-sgp30-nothing-fits-like-expected/599421 for a similar experience.
Closing since not a library issue. Can reopen if Sensirion SGP30's exist with different I2C addresses. Per the datasheet, 0x58
is the only I2C address.
The fix would be to add an address parameter to begin()
.
If you want to use this library with counterfeit hardware, then you'll need to fork it and modify it as needed.
Thank you all. Turns out the boards' silkscreen was SGP30 but the sensor was SGP40.
The title says it all, I just got a brand new SGP30 from Aliexpress with i2c address 0x59. Product's datasheet https://sensirion.com/media/documents/984E0DD5/61644B8B/Sensirion_Gas_Sensors_Datasheet_SGP30.pdf says 0x58, which is also hardcoded into the library.
I suggest breaking a variable outside the library for the user to enter the required address.