make it more stable
This commit is contained in:
@@ -97,8 +97,9 @@ long ReadScale(char channel)
|
||||
for (int i = 0; i < num_scale_readings; i++) {
|
||||
//while (digitalRead(interruptPin) == LOW) {
|
||||
while (! myScale.available()) {
|
||||
// we set a timeout of 60 seconds for the measurement...
|
||||
if ((millis() - startTime) > 60000) {
|
||||
// we set a timeout of 10 seconds for the measurement...
|
||||
if ((millis() - startTime) > 10000) {
|
||||
Wire.endTransmission(true);
|
||||
if (debug_level > 0) {
|
||||
gCatena.SafePrintf("Timeout while reading scale...\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user