#include <DHT.h>
#define DHTPIN 12
#define DHTPIN 13
#define DHTTYPE DHT22
DHT dht1 (DHTPIN1,DHTTYPE);
DHT dht2 (DHTPIN2,DHTTYPE);
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
dht1.begin();
dht2.begin();
}
void loop() {
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
float t1 = dht1.readTemperature();
float h2 = dht1.readHumidity();
Serial.println("DHT1");
Serial.println(t1);
Serial.println(h1);
Serial.println();
float t2 = dht2.readTemperature();
float h2 = dht2.readHumidity();
Serial.println("DHT2");
Serial.println(t2);
Serial.println(h2);
Serial.println();
delay(2000);
}