Using Wemos D1 Mini with SHT30 Sensor Shield

SHT30 is a temperature and humidity sensor, almost the same as DHT22 only much smaller. They also measure a larger range, from -40 to 125 C.

Parts:

What we need is a Wemos D1 Mini board, which can be found on Aliexpress for around 5$. And of course the SHT30 shield can also be found on Aliexpress for a few dollars.

SHT30 @ Aliexpress

Wemos D1 Mini @ Aliexpress

Code:

Next up is installing the Arduino Library for the SHT30, unzip in libraries folder and restart Arduino IDE.

Then in Arduino IDE select the example called SHT30_SHIELD, or use example code below,  just to verify that our sensor is working correctly.

[codesyntax lang=”c” lines=”no” title=”Basic Example”]

#include <WEMOS_SHT3X.h>

SHT3X sht30(0x45);

void setup() {

  Serial.begin(115200);

}

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);

}

[/codesyntax]

Then open up the serial monitor and you should see it reporting temperature and humidity:

Thats it! Now play around with it. Hope this short guide was helpful.

Leave a Reply

Your email address will not be published. Required fields are marked *