Interfacing G-Sense SHT35 High Accuracy Humidity & Temperature Sensor with Arduino, ESP32, and GLYPH-C3. Includes pinout, circuit diagram, and example code.
The Gsense-SHT35 is a high-precision temperature and humidity sensor from Sensirion. It is part of the SHT3x series and is known for its high accuracy, reliability, and fast response time. It communicates via I²C and provides digital output for temperature and relative humidity readings.This sensor can be used with the Glyph development board to measure environmental temperature and humidity. The sensor provides high accuracy and stability, making it suitable for precise atmospheric monitoring.
HVAC Systems: HVAC systems to monitor and control temperature and humidity, ensuring comfortable indoor environments.
Weather Stations: These sensors are used in weather stations to measure temperature and humidity for weather forecasting.
Industrial Monitoring: The SHT35 is used in various industrial settings to monitor temperature and humidity, which can affect production processes and equipment performance.
Smart Agriculture:The SHT35 can be used in agriculture to monitor soil and air temperature and humidity, optimizing irrigation and crop management.
This guide will help you interface an SHT35 Temperature and Humidity sensor GLYPH-C6(but any GLYPH development board from the ESP32 Series should work)
Install the Necessary Libraries
Download and install Adafruit_SHT31, this library works for SHT3x Series.
Enter the following code into the Arduino IDE
#include <Wire.h> // Include the Wire library for I2C communication#include "Adafruit_SHT31.h" // Include the Adafruit SHT31 library (compatible with SHT35)// Define I2C pins for GlyphC6#define SDA_PIN 4 // GPIO4 as SDA (I2C Data)#define SCL_PIN 5 // GPIO5 as SCL (I2C Clock)// Create an instance of the SHT31 class (compatible with SHT35)Adafruit_SHT31 sht35 = Adafruit_SHT31();void setup() { Serial.begin(115200); // Start serial communication at 115200 baud rate // Wait for the serial monitor to open (useful for debugging) while (!Serial) { delay(1000); } Serial.println("SHT35 Sensor Test with GlyphH2"); // Initialize I2C communication with the defined SDA and SCL pins Wire.begin(SDA_PIN, SCL_PIN); // Initialize the SHT35 sensor with its default I2C address (0x45 is the alternate address) if (!sht35.begin(0x44)) { Serial.println("Couldn't find SHT35 sensor! Check wiring."); delay(1000); // Wait before retrying } else { Serial.println("SHT35 sensor found!"); }}void loop() { // Read temperature in Celsius float temp = sht35.readTemperature(); // Read humidity in percentage float humidity = sht35.readHumidity(); // Check if the readings are valid (not NaN) if (!isnan(temp) && !isnan(humidity)) { Serial.print("Temperature: "); Serial.print(temp); Serial.println(" *C"); Serial.print("Humidity: "); Serial.print(humidity); Serial.println(" %RH"); } else { Serial.println("Failed to read from SHT35 sensor!"); } delay(2000); // Wait 2 seconds before taking the next reading}
Select the Board and Port
Do the following settings in your Arduino IDE,
Do the following settings in your Arduino IDE,
Tools > Board > esp32 > Pcbcupid GLYPH C6
For the Pcbcupid GLYPH C6 to appear under Tools > Board > esp32, the esp32 board version installed in the Arduino IDE should be greater than or equal to 3.1.0.
Tools > Port and select the port connected to your GLYPH.
Tools > USB CDC on Boot >Enabled
If USB CDC on BOOT not enabled, you won’t be seeing any serial data on Arduino IDE.
Upload the Code
Click the upload button (➡️ icon) or use the shortcut CTRL + U in Arduino IDE to upload the code to the board.