Hi I am attempting to use the Arduino IDE to program a QTpy ESP32-S2 so that I can use a SCD30 CO2/Humidity and Temp sensor.
The QTpy is set up with the Arduino IDE fine and I can run other example sketches on it. When I run the adafruit_scd30_test example sketch I get the following printed messages in the Serial monitor:
Adafruit SCD30 test!
Failed to find SCD30 chip
The QTpy and the SCD30 are connected via the built in STEMMA QT connectors. I feel like that might be the issue, maybe the sketch is expecting me to declare the pins for certain connections? but I am not sure how to do that with the "Adafruit_SCD30" library.
Any help would be really appreciated.
SCD30 Arduino test issues
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_carter
- Posts: 29483
- Joined: Tue Nov 29, 2016 2:45 pm
Re: SCD30 Arduino test issues
This is a common source of confusion. The STEMMA QT connector on the QT PY ESP32-S2 is accessed via Wire1 in Arduino:
https://learn.adafruit.com/adafruit-qt- ... or-3107922
By default, the SCD30 library will use Wire.
Just need to update code to specify the non-default Wire1 instead. Change this line:
to:
https://learn.adafruit.com/adafruit-qt- ... or-3107922
By default, the SCD30 library will use Wire.
Just need to update code to specify the non-default Wire1 instead. Change this line:
Code: Select all
if (!scd30.begin()) {
Code: Select all
if (!scd30.begin(SCD30_I2CADDR_DEFAULT, &Wire1)) {
Please be positive and constructive with your questions and comments.