0

QT PY Can't see SCD-40
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

QT PY Can't see SCD-40

by 4hbots on Tue Jul 05, 2022 12:02 pm

Greetings,

I am having some communication problems with an SCD-40 and a QT PY esp32-s2. When trying to run the exampleUsage sketch, I get the results below. I am using an Adafruit JST cable on the quick connect ports and have a green power LED lit on the CO2 sensor, but there seems to be a problem with the I2C comms. Did I miss a configuration step somewhere?

Thanks




Error trying to execute stopPeriodicMeasurement(): Received NACK on transmit of address
Error trying to execute getSerialNumber(): Received NACK on transmit of address
Error trying to execute startPeriodicMeasurement(): Received NACK on transmit of address
Waiting for first measurement... (5 sec)
Error trying to execute readMeasurement(): Received NACK on transmit of address
Error trying to execute readMeasurement(): Received NACK on transmit of address
Error trying to execute readMeasurement(): Received NACK on transmit of address
Error trying to execute readMeasurement(): Received NACK on transmit of address...

4hbots
 
Posts: 9
Joined: Sun Nov 15, 2015 10:56 pm

Re: QT PY Can't see SCD-40

by dastels on Tue Jul 05, 2022 12:32 pm

The STEMMA-QT port on the QTPY ESP32-s2 uses SDA1 and SCL1, while the header I2C uses SDA and SCL. See https://learn.adafruit.com/adafruit-qt-py-esp32-s2/pinouts.

Dave

dastels
 
Posts: 10563
Joined: Tue Oct 20, 2015 3:22 pm

Re: QT PY Can't see SCD-40

by 4hbots on Tue Jul 05, 2022 5:50 pm

Dave,

Thanks!!

I should have looked at that more closely. It is working now.


Co2:523 Temperature:23.29 Humidity:58.35
Co2:522 Temperature:23.28 Humidity:58.32
Co2:522 Temperature:23.30 Humidity:58.26
Co2:522 Temperature:23.30 Humidity:58.20
Co2:521 Temperature:23.30 Humidity:58.16

4hbots
 
Posts: 9
Joined: Sun Nov 15, 2015 10:56 pm

Re: QT PY Can't see SCD-40

by dastels on Tue Jul 05, 2022 7:28 pm

Awesome!

Dave

dastels
 
Posts: 10563
Joined: Tue Oct 20, 2015 3:22 pm

Please be positive and constructive with your questions and comments.