ESP8266 and SHt30 shield example

This time we look at the SHT30 shield from Wemos. Now there are other versions of this board as well, this is the official one. You will notice they now use LOLIN (after all of the dubious clones of their products I’m assuming on the internet)

For reference the other boards look like this, I have tried these and they work as well

Here is some blurb about the SHT30

The new digital SHT3x humidity sensor series takes sensor technology to a new level. As the successor of the SHT2x series it is determined to set the next industry standard in humidity sensing. The SHT3x humidity sensor series consists of a low-cost version with the SHT30 humidity sensor, a standard version with the SHT31 humidity sensor, and a high-end version with the SHT35 humidity sensor. The SHT3x humidity sensor series combines multiple functions and various interfaces (I2C, analog voltage output) with a applications-friendly, very wide operating voltage range (2.15 to 5.5 V). The SHT3x humidity sensor is available in both large and small volumes.

More information at sensiron

The sensor is an I2C device so uses D1 and D2

Parts List

Here are the parts I used

 

Name Links
Wemos Mini
SHT30 Shield
Connecting cables

 

Code

Wemos have their own library so we will use that – https://github.com/wemos/WEMOS_SHT3x_Arduino_Library

I changed the baud rate in Serial.begin, I couldn’t get the example to work. Not sure why but this did. there is also an example which use this and the OLED shield in the github repo, worth looking at

#include <WEMOS_SHT3X.h>

SHT3X sht30(0x45);

void setup() 
{
  Serial.begin(9600);
}

void loop() {

  if(sht30.get()==0){
    Serial.print("Temperature in Celsius : ");
    Serial.println(sht30.cTemp);
    Serial.print("Temperature in Fahrenheit : ");
    Serial.println(sht30.fTemp);
    Serial.print("Relative Humidity : ");
    Serial.println(sht30.humidity);
    Serial.println();
  }
  else
  {
    Serial.println("Error!");
  }
  delay(1000);

}

 

Output

Open the serial monitor and you should see something like this

Temperature in Celsius : 30.47
Temperature in Fahrenheit : 86.84
Relative Humidity : 40.68

Temperature in Celsius : 31.28
Temperature in Fahrenheit : 88.31
Relative Humidity : 53.50

Temperature in Celsius : 31.73
Temperature in Fahrenheit : 89.12
Relative Humidity : 61.84

 

LEAVE A REPLY

Please enter your comment!
Please enter your name here