diff options
Diffstat (limited to 'src/tempmodule/main.ino')
-rw-r--r-- | src/tempmodule/main.ino | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/tempmodule/main.ino b/src/tempmodule/main.ino index 58f749a..f76ee20 100644 --- a/src/tempmodule/main.ino +++ b/src/tempmodule/main.ino @@ -83,6 +83,11 @@ void loop(void) udp_push(&data, sizeof(data)); udp_push(&ticker, sizeof(ticker)); + /* + * We need to do all seven reads each time. + * We also have to work hard for the compiler + * to not optimize the load out. + */ for (i = 0; i < 7; ++i) { dataptr[1] = Wire.read(); dataptr[0] = Wire.read(); @@ -151,10 +156,10 @@ static void wifi_connect(const char * const ssid, const char * const password, c static void blink_led(const int pin, const int ontime, const int offtime) { - digitalWrite(pin, HIGH); - delay(ontime); - digitalWrite(pin, LOW); - delay(offtime); + digitalWrite(pin, HIGH); + delay(ontime); + digitalWrite(pin, LOW); + delay(offtime); } static void discover_client(void) |