#include <DHT.h>
#define DHTPIN1 4
#define DHTPIN2 5
#define DHTTYPE DHT22
DHT dht1(DHTPIN1, DHTTYPE), dht2(DHTPIN2,DHTTYPE);
void setup() {
Serial.begin(115200);
dht1.begin();
dht2.begin();
}
void loop() {
int temp1 = (int)dht1.readTemperature();
int hum1 = (int)dht1.readHumidity();
int temp2 = (int)dht2.readTemperature();
int hum2 = (int)dht2.readHumidity();
Serial.printf("DHT1: %d ํc %d%%RH\n", temp1, hum1);
Serial.printf("DHT2: %d ํc %d%%RH\n", temp2, hum2);
delay(2000);
}