GY-63_MS5611/libraries/DHTstable/examples/dht11_two/dht11_two.ino

49 lines
829 B
Arduino
Raw Normal View History

2022-05-19 06:33:49 -04:00
//
// FILE: dht11_two.ino
// AUTHOR: Rob Tillaart
// PURPOSE: DHT library test sketch for DHT11 && Arduino
// URL: https://github.com/RobTillaart/DHTstable
#include "DHTStable.h"
DHTStable DHT_A;
DHTStable DHT_B;
#define DHT11_PIN_A 5
#define DHT11_PIN_B 6
void setup()
{
Serial.begin(115200);
Serial.println(__FILE__);
Serial.print("LIBRARY VERSION: ");
Serial.println(DHTSTABLE_LIB_VERSION);
Serial.println();
}
void loop()
{
Serial.print("DHT A:\t");
DHT_A.read11(DHT11_PIN_A);
2022-05-19 06:33:49 -04:00
Serial.print(DHT_A.getHumidity());
Serial.print(",\t");
Serial.println(DHT_A.getTemperature());
Serial.print("DHT B:\t");
DHT_B.read11(DHT11_PIN_B);
2022-05-19 06:33:49 -04:00
Serial.print(DHT_B.getHumidity());
Serial.print(",\t");
Serial.println(DHT_B.getTemperature());
delay(2000);
}
// -- END OF FILE --