ESP32-S3 YOUTH #3 - Stemma QT Temperature Sensor Connection

by KusTech in Circuits > Arduino

48 Views, 0 Favorites, 0 Comments

ESP32-S3 YOUTH #3 - Stemma QT Temperature Sensor Connection

ESP32-S3 Youth Stemma QT SHT340.png

Hello fellas!

In this article, I’ll show you how to connect a sensor with a STEMMA QT connector from Adafruit. We’ll use the popular and reliable SHT40 temperature and humidity sensor as an example.

Before we start, make sure you’ve read the article where I explain what this board is, how to configure the Arduino IDE, and how to upload your first code. It’ll make things a lot easier.


Technical Details:

The STEMMA QT Connector is a handy 4-pin plug for quick I²C connections between sensors, microcontrollers, and more. It’s based on SparkFun’s Qwiic standard, making it plug-and-play and sparing you the hassle of extra soldering or wiring.

The SHT40 is a high-precision temperature and humidity sensor that’s perfect for keeping an eye on environmental conditions. It’s compact, energy-efficient, and beginner-friendly. Just connect it via I²C, load up your code, and you’re all set to start collecting data. No hassle, just results!

Supplies

3#_Supplys.png
ESP32-S3 Youth Pinout.png

You can find ESP32 boards on my Tindie store:

  1. ESP32-S3 Youth - Full Kit
  2. ESP32-S3 Youth - Amy
  3. ESP32-S3 Youth - Natalia
  4. ESP32-S3 Youth - Vika

And SHT40 Sensor on Amazon

  1. SHT40 Temperatur Sensor
  2. Adafruit cable

P.S. 1 Euro can be helpful, but it's totally optional :)

Connect Sensor to the Board

IMG_6087.jpg

Let’s start with the hardware—time to connect the sensor to the board. This is done using the STEMMA QT connector, located at the top of the board. Adafruit sensors are designed to be daisy-chained, so you can hook up multiple sensors in a row and read data from all of them using a single I²C bus.

After sensor is in - connect the ESP32 board to your PC.

Upload the Code

3#_upload_code.png

It’s a simple task (if you’ve read the guide!):

  1. Create a folder on your computer (I recommend Documents > Arduino) and name it ESP32_Youth_SHT40.
  2. Download the attached file ESP32_Youth_SHT40.ino and place it in the folder you just created.
  3. Open the file in Arduino IDE and upload it to the board.

Once the code is uploaded, press the "Rst" button on the board, and go to the next step.

Check the Result

3#_Serial.png

And now, the End part!

Click the magnifying glass in the top-right corner of Arduino IDE to open the Serial Monitor—you’ll see temperature and humidity data show up every 2 seconds.

Check that the baud rate in the bottom-right corner is set to 115200.

Now, put your finger on the sensor and see how the temperature reading changes. Impressive, isn't it?

In Conclusion

ESP32-S3 Youth Tindie

Thank you for reading this article! If you have any questions or if something doesn’t work, feel free to ask in the comments section.


By the way - don't forget to check all Collection in my Tindie shop :)