#include "DHT.h"
#define Ledred 12
#define Ledblue 26
#define DHT22pin 5
DHT dht(DHT22pin, DHT22);
void setup() {
// put your setup code here, to run once:
pinMode(Ledred, OUTPUT);
pinMode(Ledblue, OUTPUT);
dht.begin();
Serial.begin(115200);
}
void loop() {
float hum = dht.readHumidity();
float temp =dht.readTemperature();
Serial.print("Temperature: ");
Serial.print(temp);
Serial.print(" C ");
Serial.print("Humidity: ");
Serial.print(hum);
Serial.println(" % ");
delay(1000);
// put your main code here, to run repeatedly:
// this speeds up the simulation
}