#include <Wire.h>
#include <DHT.h>
#define DHTPIN 14
#define DHTTYPE DHT22
DHT dht(DHTPIN,DHTTYPE);
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
pinMode(14, INPUT);
dht.begin();
}
void loop() {
// put your main code here, to run repeatedly:
float t = dht.readTemperature();
float h = dht.readHumidity();
Serial.print("suhu=");
Serial.println(t);
Serial.print("kelembaban=");
Serial.println(h);
delay(10); // this speeds up the simulation
}