This help to define OW without pin (initially in global scope) and define it later in setup() / loop().
This allows storing of configuration of OW PINs e.g. on SPIFFS, so setup() can first read them and properly configure PINs.
E.g.:
OneWire oneWire_1, oneWire_2;
void setup() {
// read PIN e.g. from SPIFFS
Serial.println("Setup 1W T1");
oneWire_1.apin(pin.toInt()); // Set the pin
// then use normally
}
This help to define OW without pin (initially in global scope) and define it later in setup() / loop().
This allows storing of configuration of OW PINs e.g. on SPIFFS, so setup() can first read them and properly configure PINs.
E.g.: