Needing a way to change the onewire pin dynamically, based on configuration from an api server, I added a begin method to the OneWire class. The previous method of setting the pin in the constructor is preserved.
Looks like my editor messed up indentation for the changes, using space instead of tab, oops!
and why not just delete the onewire-object and create a new one with the changed pin?
a begin() routine would not be the right way to use a bus-interface, because the internal ow-states are pin-dependant.
Needing a way to change the onewire pin dynamically, based on configuration from an api server, I added a begin method to the OneWire class. The previous method of setting the pin in the constructor is preserved.
Looks like my editor messed up indentation for the changes, using space instead of tab, oops!