PaulStoffregen / OneWire

Library for Dallas/Maxim 1-Wire Chips
http://www.pjrc.com/teensy/td_libs_OneWire.html
579 stars 382 forks source link

Added begin method #22

Closed gordonthree closed 6 years ago

gordonthree commented 7 years ago

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!

orgua commented 6 years ago

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.