8000 Added begin method by gordonthree · Pull Request #22 · PaulStoffregen/OneWire · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Added begin method #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed

Conversation

gordonthree
Copy link

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!

…ing the constructor

	modified:   OneWire.cpp
	modified:   OneWire.h
… be set or changed within the program itself

	modified:   OneWire.h added begin method, kept constructor compatible with old way of doing things too
	modified:   library.json added my name and email
	modified:   library.properties added my name
@orgua
Copy link
orgua commented Jul 16, 2017

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.

This was referenced Jul 28, 2017
< 6151 /div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0