Serial debug added for 1wire initialization

This commit is contained in:
Ollo
2025-05-03 16:46:53 +02:00
parent 1190b0324e
commit 9435bf8392
2 changed files with 11 additions and 5 deletions
+8 -2
View File
@@ -837,12 +837,18 @@ void safeSetup()
uint8_t sensorCount = 0U;
/* Required to read the temperature at least once */
while ((sensorCount == 0 || !battery.isFound()) && millis() < tempInitStartTime + TEMPERATUR_TIMEOUT)
for(int i=0;
((sensorCount == 0 || !battery.isFound()) && millis() < tempInitStartTime + TEMPERATUR_TIMEOUT);
i++)
{
sensors.begin();
battery.begin();
sensorCount = sensors.getDS18Count();
delay(50);
if (i > 1)
{
Serial << "DS18S20 count: " << sensorCount << ", battery is found: " << battery.isFound() << " ( loop: " << i << " )" << endl;
}
delay(100);
}
readOneWireSensors();