#include <LiquidCrystal_PCF8574.h>
#include <SHT1x.h>
LiquidCrystal_PCF8574 lcd(0x27);
// Specify data and clock connections and instantiate SHT1x object
#define dataPin A3
#define clockPin A2
// default to 5.0v boards, e.g. Arduino UNO
SHT1x sht1x(dataPin, clockPin);
char grados = 223;
void setup() {
// put your setup code here, to run once:
lcd.begin(20, 4); // initialize the lcd
delay(200);
lcd.setBacklight(255);
lcd.print("Humedad:");
lcd.setCursor(0, 1);
lcd.print("Temperatura:");
}
void loop() {
// put your main code here, to run repeatedly:
// Read values from the sensor
float h = sht1x.readHumidity();
float t = sht1x.readTemperatureC();
lcd.setCursor(13, 0);
lcd.print(h, 1);
lcd.print("% ");
lcd.setCursor(13, 1);
lcd.print(t, 1);
lcd.print(grados);
lcd.print("C ");
delay(1000);
}