I am currently trying to read data from three separate DHT11 sensors; however, I can only get 1 sensor to work. I think the other sensors are either not registering or being overwritten. This is the code:
dht DHT;
dht DHT2;
dht DHT3;
#define DHT11_PIN 5
#define DHT11_PIN 6
#define DHT11_PIN 7
void setup(){
Serial.begin(9600);
}
void loop(){
int chk = DHT.read11(DHT11_PIN);
Serial.print("DHT Temperature = ");
Serial.println(DHT.temperature);
Serial.print("DHT Humidity = ");
Serial.println(DHT.humidity);
chk = DHT2.read11(DHT11_PIN);
Serial.print("DHT 2 Temperature = ");
Serial.println(DHT2.temperature);
Serial.print("DHt 2 Humidity = ");
Serial.println(DHT2.humidity);
chk = DHT3.read11(DHT11_PIN);
Serial.print("DHT 3 Temperature = ");
Serial.println(DHT3.temperature);
Serial.print("DHT 3 Humidity = ");
Serial.println(DHT3.humidity);
delay(5000);
}