-
Notifications
You must be signed in to change notification settings - Fork 4
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
Making it simpler to use multiple OneWire buses with an arduino array #2
base: master
Are you sure you want to change the base?
Conversation
…lify multiple OneWire buse use, allowing for easier construction of arrays of OneWire buses, in the limited environment provided by Arduino. See the Multibus_simple example illustrating a use-case of the extension.
int oneWirePins[]={3,7};//OneWire DS18x20 temperature sensors on these wires | ||
const int oneWirePinsCount=sizeof(oneWirePins)/sizeof(int); | ||
|
||
OneWire ds18x20[oneWirePinsCount]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line gives me this error:
Multibus_simple:8: error: no matching function for call to 'OneWire::OneWire()'
OneWire ds18x20[oneWirePinsCount];
^
I guess because there is no constructor that takes an array as argument?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wait, I got a bit confused there... This example is for the DallasTemperature.h
lib... And is already merged there... However, since this change was never merged into this library, that example won't work with the official version of this library.
Another error I'm getting:
Multibus_simple:23: error: 'class OneWire' has no member named 'setPin'
ds18x20[i].setPin(oneWirePins[i]);
^
@ntruchsess Please look at this Pull Request |
Joakim: since ntruchsess has not updated thearduino-OneWire library in the On Sat, Dec 26, 2015 at 10:35 PM, Joakim Söderberg <[email protected]
|
@prashantdev yea I know, are you planning on keeping on maintaining the lib? I just want this stuff to be in the "official" version of the lib. It sucks if people have to go hunt for some special version of a lib to get things to work. But I guess this is normal in the arduino community, where most sketches are copy and paste, it just irks me :) Hmm but now I read the comment in the header, and see that https://github.com/PaulStoffregen/OneWire is the "real" version. And that this one is just a fork.... So yea, very confusing. Not to mention the @ntruchsess If you have abandoned this fork, I think it would be nice to link to https://github.com/PaulStoffregen/OneWire and mark this repository as dead. |
This problem is occurring because Mikes Burton has implemented my changes
|
And no. I am not qualified to update the onewire library. My knowledge of
c is too limited
|
I'm a novice at C, so feel free to correct my SNAFUs.