the reading of the first sensor who executes the requestTemperatures function is stuck (i get a response, but always the same value regardless of real temperature). the sensor which executes the requestTemperatures function the line beneath the first one is ok. if i swap these 2 lines it is still the first sensor in code appearance which get stuck. eg.:
sensorX.requestTemperatures(); <- this sensor is stuck
sensorY.requestTemperatures(); <- this one is ok
Also it does not matter if the resolution is set to 9, 10, 11 or 12. If setResolution is executed the first sensor who do a requestTemperatures is stuck. If setResolution is not executed, both sensors work as they should.
Workaround:
Just set the setResolution and upload the sketch. Then comment out the setResolution function and upload again. The Sensor will remember the resolution from previous upload and when the setResolution function is not executed in the actual Sketch both Sensors work as expected with wanted resolution..
PS: I am working with latest PlatformIO and ESP32.
I am testing with the TwoPin_DS18B20.ino Example and both Sensors are working as expected.
But when i add following code in setup() function after sensor.begin():
the reading of the first sensor who executes the
requestTemperatures
function is stuck (i get a response, but always the same value regardless of real temperature). the sensor which executes therequestTemperatures
function the line beneath the first one is ok. if i swap these 2 lines it is still the first sensor in code appearance which get stuck. eg.:Also it does not matter if the resolution is set to 9, 10, 11 or 12. If
setResolution
is executed the first sensor who do arequestTemperatures
is stuck. IfsetResolution
is not executed, both sensors work as they should.Workaround: Just set the
setResolution
and upload the sketch. Then comment out thesetResolution
function and upload again. The Sensor will remember the resolution from previous upload and when thesetResolution
function is not executed in the actual Sketch both Sensors work as expected with wanted resolution..PS: I am working with latest PlatformIO and ESP32.