diff --git a/DHT.cpp b/arduino-DHT.cpp similarity index 99% rename from DHT.cpp rename to arduino-DHT.cpp index 525e32a..fbb5ba6 100644 --- a/DHT.cpp +++ b/arduino-DHT.cpp @@ -26,7 +26,7 @@ 2013-07-01: Add a resetTimer method ******************************************************************/ -#include "DHT.h" +#include "arduino-DHT.h" void DHT::setup(uint8_t pin, DHT_MODEL_t model) { diff --git a/DHT.h b/arduino-DHT.h similarity index 100% rename from DHT.h rename to arduino-DHT.h diff --git a/examples/DHT_Test/DHT_Test.pde b/examples/DHT_Test/DHT_Test.ino similarity index 72% rename from examples/DHT_Test/DHT_Test.pde rename to examples/DHT_Test/DHT_Test.ino index e6afba3..9797e93 100644 --- a/examples/DHT_Test/DHT_Test.pde +++ b/examples/DHT_Test/DHT_Test.ino @@ -1,4 +1,4 @@ -#include "DHT.h" +#include "arduino-DHT.h" DHT dht; @@ -6,9 +6,15 @@ void setup() { Serial.begin(9600); Serial.println(); - Serial.println("Status\tHumidity (%)\tTemperature (C)\t(F)"); dht.setup(2); // data pin 2 + if ( dht.getModel() == DHT::DHT11 ) { + Serial.println("Auto-detected DHT11"); + } else if ( dht.getModel() == DHT::DHT22 ) { + Serial.println("Auto-detected DHT22"); + } + + Serial.println("Status\tHumidity (%)\tTemperature (C)\t(F)"); } void loop()