From b84a6d8b19d262bff7b9f45bde518b29c04d7c8c Mon Sep 17 00:00:00 2001 From: Juerd Waalboer Date: Sat, 13 Mar 2021 19:04:19 +0100 Subject: [PATCH] Flush serial buffers before sending 0x87 --- operame.ino | 1 + 1 file changed, 1 insertion(+) diff --git a/operame.ino b/operame.ino index 975df83..d755952 100644 --- a/operame.ino +++ b/operame.ino @@ -262,6 +262,7 @@ int aqc_get_co2() { void aqc_set_zero() { const uint8_t command[9] = { 0xff, 0x01, 0x87, 0, 0, 0, 0, 0, 0x78 }; + flush(hwserial1); hwserial1.write(command, sizeof(command)); }