I'm not sure I understand the how the functions in the library work. I use the following extensively:
Temp1.requestTemperatures(); // where Temp1 is properly established in my declarations
These have worked reliably for several years. Recently, however, I have noticed two anomalies:
In some of my units (some are pro-mini and some are nano) I don't get a valid temperature until the second pass. I suspect the reading is always one loop late.
I read these temperatures in a void function called readtemps() and assign the values to global variables. Lately, in a couple of uploaded sketches, I have gotten only zero(0.0) values. I can "fix" that by inserting a random delay, a few microseconds, into the function, but the delay isn't between the two calls above, but after the "getTempCByIndex() call. This makes no sense to me.
My main question is, do these functions work like Serial.print(), where there is some background serial communication going on after the function has returned. E.G., can you "step on" the background process and kill it so that you get odd results? I was under the impression that the "requestTemp" function stimulated the sensor to start a conversion and the "getTemp" function read the result, in each case the functions did not return until they had finished their operation?
I only use one DS18B20 per wire, no multiple sensors. Is there a good tutorial where I can use more basic calls to the library that are faster than waiting (up to 700 msec, I understand) for a conversion to complete (do the request then come back and do the get later?).