Closed dtworth closed 5 years ago
While GPIO 0 is a valid pin, it has a few restrictions on its use since it is directly tied to the boot process. If you connect a sensor to this pin and it pulls the pin LOW when the esp32 is booting the boot process will be interrupted on the esp32. GPIO 0 should be avoided for inputs and should likely be rejected as a sensor pin.
GPIO2 is similar in this regard. https://github.com/espressif/esptool/wiki/ESP32-Boot-Mode-Selection
Perhaps you should prevent that pin from being defined as an input in the first place. The command <S 0 0 0> still works.
this has been included in the development branch with plans to be included in the v1.2.0 release planned for this coming weekend.
It looks like the line "if(sensor->getPin() > 0) {" was added to "SensorManager::store()" . Maybe it should be "if(sensor->getPin() >= 0) {" since GPIO0 is a valid port.