diff --git a/examples/idDHT11_Lib_example/idDHT11_Lib_example.ino b/examples/idDHT11_Lib_example/idDHT11_Lib_example.ino index 8d7ceca..b043514 100644 --- a/examples/idDHT11_Lib_example/idDHT11_Lib_example.ino +++ b/examples/idDHT11_Lib_example/idDHT11_Lib_example.ino @@ -12,7 +12,7 @@ int idDHT11pin = 2; //Digital pin for comunications int idDHT11intNumber = 0; //interrupt number (must be the one that use the previus defined pin (see table above) //declaration -void dht11_wrapper(); +void dht11_wrapper(); // must be declared before the lib initialization // Lib instantiate idDHT11 DHT11(idDHT11pin,idDHT11intNumber,dht11_wrapper); @@ -25,6 +25,8 @@ void setup() Serial.println(IDDHT11LIB_VERSION); Serial.println("---------------"); } +// This wrapper is in charge of calling +// mus be defined like this for the lib work void dht11_wrapper() { DHT11.isrCallback(); } diff --git a/examples/idDHT11_Lib_example_Simple/idDHT11_Lib_example_Simple.ino b/examples/idDHT11_Lib_example_Simple/idDHT11_Lib_example_Simple.ino index fe3b65b..b43182a 100644 --- a/examples/idDHT11_Lib_example_Simple/idDHT11_Lib_example_Simple.ino +++ b/examples/idDHT11_Lib_example_Simple/idDHT11_Lib_example_Simple.ino @@ -14,7 +14,7 @@ int idDHT11pin = 2; //Digital pin for comunications int idDHT11intNumber = 0; //interrupt number (must be the one that use the previus defined pin (see table above) //declaration -void dht11_wrapper(); +void dht11_wrapper(); // must be declared before the lib initialization // Lib instantiate idDHT11 DHT11(idDHT11pin,idDHT11intNumber,dht11_wrapper); @@ -27,6 +27,8 @@ void setup() Serial.println(IDDHT11LIB_VERSION); Serial.println("---------------"); } +// This wrapper is in charge of calling +// mus be defined like this for the lib work void dht11_wrapper() { DHT11.isrCallback(); }