millis() returns 4 byte integer, assigning it to a 2 byte integer will result a system fail after 65 seconds (although during testing this didn't happen?)
parent
448b416aa2
commit
0f833603b6
|
@ -61,7 +61,7 @@ void loop()
|
|||
{
|
||||
// there will only be a new data point every this many milliseconds
|
||||
// so we don't need to check every loop
|
||||
uint16_t currentMillis = millis();
|
||||
uint32_t currentMillis = millis();
|
||||
if (currentMillis - lastMillis > DATA_READ_INTERVAL)
|
||||
{
|
||||
lastMillis = currentMillis;
|
||||
|
|
Loading…
Reference in New Issue