Nice work, just what i needed but ran into an issue.
I tried a conversion time of 1000 millis but i only get 1 reading, the 1500 millis as in the example works until....
If _conversionMillis is higher than the set interval, requestTemperature is never called, should not be a problem if the interval is higher than 750 millis for 12 bit but there is a catch..
_conversionMillis is adaptive to the actual conversion time but that is where the problem is, the time calculated for the new _conversionMillis includes the overhead in my main loop, not the actual convertion time of the sensor so in my main loop i interact with a rotary encoder, switchs menus, rebuild a screen etc, the time this takes is included in the new _conversionMillis and once this is higher than the set interval, no more readings.
This is also why it does not work with a setting of 1000 millis because i build my screen at the start and that takes a little bit more time than the interval.
Nice work, just what i needed but ran into an issue.
I tried a conversion time of 1000 millis but i only get 1 reading, the 1500 millis as in the example works until....
If _conversionMillis is higher than the set interval, requestTemperature is never called, should not be a problem if the interval is higher than 750 millis for 12 bit but there is a catch..
_conversionMillis is adaptive to the actual conversion time but that is where the problem is, the time calculated for the new _conversionMillis includes the overhead in my main loop, not the actual convertion time of the sensor so in my main loop i interact with a rotary encoder, switchs menus, rebuild a screen etc, the time this takes is included in the new _conversionMillis and once this is higher than the set interval, no more readings.
This is also why it does not work with a setting of 1000 millis because i build my screen at the start and that takes a little bit more time than the interval.