make it more stable
This commit is contained in:
parent
d2e4b81416
commit
b71e0c0f0c
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue