#include <DHT.h>
#define DHTPIN 9
#define DHTTYPE DHT22
DHT dht (DHTPIN, DHTTYPE) ;
void setup() {
// put your setup code here, to tun once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
float suhu=dht.readTemperature();
float kelembaban=dht.readHumidity();
Serial.print("SUHU : "); Serial.print(suhu);
Serial.print("|KELEMBABAN :"); Serial.print(kelembaban );
Serial.println();
delay(500);
}