diff --git a/NodeManagerTemplate/NodeManager.cpp b/NodeManagerTemplate/NodeManager.cpp index c747f8c6050364115fea4ea355f3f4a3d2f291f1..227ed0793de582e5aedae8e9f450cd99e7b62798 100644 --- a/NodeManagerTemplate/NodeManager.cpp +++ b/NodeManagerTemplate/NodeManager.cpp @@ -1077,8 +1077,10 @@ int NodeManager::registerSensor(Sensor* sensor) { Serial.print(" T="); Serial.println(sensor->getType()); #endif - // set auto power pin - sensor->setAutoPowerPins(_auto_power_pins); + #if POWER_MANAGER == 1 + // set auto power pin + sensor->setAutoPowerPins(_auto_power_pins); + #endif // add the sensor to the array of registered sensors _sensors[sensor->getChildId()] = sensor; // return the child_id diff --git a/README.md b/README.md index 430e2a8d31c422f7ef285af7d0d6dbe2a8369f42..8c9a14984b2f017b9b8d8a7efd6b5368f972c49c 100644 --- a/README.md +++ b/README.md @@ -314,6 +314,8 @@ Each sensor class can expose additional methods. void setDebounce(int value); // time to wait in milliseconds after a change is detected to allow the signal to be restored to its normal value (default: 0) void setTriggerTime(int value); + // Set initial value on the interrupt pin (default: HIGH) + void setInitial(int value); ~~~ ## Upload your sketch