Hi every,
I work with the SHT20 sensor and I've got the sketch below
#include <Wire.h>
#include "DFRobot_SHT20.h"
DFRobot_SHT20 sht20;
void setup()
{
Serial.begin(9600);
Serial.println("SHT20 Example!");
sht20.initSHT20(); // Init SHT20 Sensor
delay(100);
sht20.checkSHT20(); // Check SHT20 Sensor
//sht20_sensor();
}
void loop(){
float humd = sht20.readHumidity(); // Read Humidity
float temp = sht20.readTemperature(); // Read Temperature
Serial.print(" Temperature:");
Serial.print(temp, 1); // Prints the temperature with one decimal accuracy
Serial.print("C");
Serial.print(" Humidity:");
Serial.print(humd, 1); // Prints the humidity with one decimal accuracy
Serial.println("%");
delay(1000);
}
//void sht20_sensor(){
//}
I do not have any compilation errors but the serial monitor won't print the Serial.println("SHT20 Example!"); which is written in the setup function.
Any advice?