Sensiron SGP41 I2C code for Arduino
Posted: Sat Aug 05, 2023 2:54 pm
Hello,
I'm having trouble getting the following code from Sensiron working on my ESP32-S2 dev board. https://github.com/Sensirion/arduino-i2c-sgp41.
I've made the following addition to the Sensiron code to setup the correct GPIOs for the I2C bus
- Wire.begin(6, 7,100000);
I believe the hardware is connected correctly for the following reasons.
1) I'm able to see the correct address on the I2C scanner
2) I'm able to retrieve my components' serial number
3) Another Sensirion sensor on the same I2C bus (different sensor model and address) is functioning correctly.
However I get the following error when running the above code
-"executeSelfTest failed with error: Not enough data received" and "Error trying to execute measureRawSignals(): Not enough data received"
Please let me know how I can debug and next steps, thanks for helping me out
I'm having trouble getting the following code from Sensiron working on my ESP32-S2 dev board. https://github.com/Sensirion/arduino-i2c-sgp41.
I've made the following addition to the Sensiron code to setup the correct GPIOs for the I2C bus
- Wire.begin(6, 7,100000);
I believe the hardware is connected correctly for the following reasons.
1) I'm able to see the correct address on the I2C scanner
2) I'm able to retrieve my components' serial number
3) Another Sensirion sensor on the same I2C bus (different sensor model and address) is functioning correctly.
However I get the following error when running the above code
-"executeSelfTest failed with error: Not enough data received" and "Error trying to execute measureRawSignals(): Not enough data received"
Please let me know how I can debug and next steps, thanks for helping me out