Serial debug added for 1wire initialization
This commit is contained in:
+8
-2
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user