Professional Documents
Culture Documents
#include <LiquidCrystal.h>
#include "DHT.h" //Aadimos la libreria con la cual trabaja nuestro sensor
#define DHTPIN 2
nuestro sensor
void setup() {
void loop()
{
int h = dht.readHumidity(); //Guarda la lectura de la humedad en la variable
float h
int t = dht.readTemperature(); //Guarda la lectura de la temperatura en la
variable float t
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
lcd.print("TP:");
lcd.setCursor(3, 1);
lcd.print(t);
lcd.setCursor(9, 1);
lcd.print("HR:");
lcd.setCursor(12, 1);
lcd.print(h);
//Serial.print(t);
Serial.print(h);
//Serial.print(",");
//Serial.print("\n");
delay(1000);
}