Arduino-Temperature-Control-Library
Arduino-Temperature-Control-Library copied to clipboard
bitResolution may be wrong upon a recallScratchPad()
Hello,
please consider such a scenario (~pseudocode).
Setup:
setWaitForConversion(true);
setCheckForConversion(false);
Trigger:
setAutoSaveScratchPad(true);
setResolution(12);
setAutoSaveScratchPad(false);
setResolution(9);
recallScratchPad();
Problem:
requestTemperatures() will not wait long enough now (bitResolution should be 12 but is 9).
There is more than one way to correct that, a straightforward one is to reevaluate bitResolution upon a recallScratchPad().
I hope this helps!