Skip to content

Module ds18b20 determining the number of detected sensors #2274

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
tjakober opened this issue Feb 25, 2018 · 3 comments
Closed

Module ds18b20 determining the number of detected sensors #2274

tjakober opened this issue Feb 25, 2018 · 3 comments
Labels

Comments

@tjakober
Copy link

tjakober commented Feb 25, 2018

Missing feature

In module ds18b20 there is no information returned about how many sensors are detected which will call the read callback function.

Justification

Using the suggested programming model one cannot determine how many devices of temperature sensors are readout during a readout call. This is of course not required in the example where its only printed on the serial port. However when you want for example to send the complete set of results at once via internet one must know when all the devices are read out to take the further actions.

It would be easiest to add a flag to the callback function to indicate whether it is the last device which was readout.

Another possibility would be in returning the number of devices detected when calling the setting function. However this would need more logic within the callback function to start the further actions and will not be safe if one device did not answer during the read.

Workarounds

I was using a "software soldering iron": Setup a timer which ensures all devices are readout and then take the further actions.

Thanks for taking care of this issue
Thomas Jakober

@TerryE
Copy link
Collaborator

TerryE commented Mar 2, 2018

@tjakober Thomas, We don't have an active maintainer for this module. The original contributer was @fetchbot and the main reviewer was @nickandrew. See #2003 for the backstory. No point in repeating here.

I use my own version of the Lua module because it reads faster and is functionally richer including the stuff that you are looking for, but what get committed here is by the majority consensus.

However, if you want to make the changes yourself and raise a PR then we'll take a look.

@stale
Copy link

stale bot commented Jul 21, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 21, 2019
@HHHartmann
Copy link
Member

This module had been replaced by a lua version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants