Skip to content

Arduino library of SHT30, SHT31, SHT35 Digital humidity and temperature sensor

Notifications You must be signed in to change notification settings

ArtronShop/ArtronShop_SHT3x

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ArtronShop_SHT3x

Arduino library of SHT30, SHT31, SHT35 Digital humidity and temperature sensor

Examples

#include <Arduino.h>
#include <Wire.h>
#include <ArtronShop_SHT3x.h>

ArtronShop_SHT3x sht3x(0x44, &Wire); // ADDR: 0 => 0x44, ADDR: 1 => 0x45

void setup() {
  Serial.begin(115200);

  Wire.begin();
  while (!sht3x.begin()) {
    Serial.println("SHT3x not found !");
    delay(1000);
  }
}

void loop() {
  if (sht3x.measure()) {
    Serial.print("Temperature: ");
    Serial.print(sht3x.temperature(), 1);
    Serial.print(" *C\tHumidity: ");
    Serial.print(sht3x.humidity(), 1);
    Serial.print(" %RH");
    Serial.println();
  } else {
    Serial.println("SHT3x read error");
  }
  delay(1000);
}

About

Arduino library of SHT30, SHT31, SHT35 Digital humidity and temperature sensor

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages