From subsecret
No edit summary |
No edit summary |
||
Line 27: | Line 27: | ||
Test programs: | Test programs: | ||
Time precision benchmark | Time precision benchmark | ||
void setup() { | void setup() { | ||
Serial.begin(9600); | Serial.begin(9600); | ||
} | } | ||
void loop() { | void loop() { | ||
while (true) { | |||
unsigned long start = millis(); | |||
delay(60000); | |||
unsigned elap = millis() - start; | |||
Serial.println(elap); | |||
} | |||
} | } |
Revision as of 17:52, 30 April 2017
Benchmark of internal time precision
Model | range of 60 sec delay() call | avg. duration of 60 sec delay() call |
---|---|---|
Arduino 101 | 59998-59999 | 59998,5625 |
Arduino Mega 2560 (clone) | 59989-59994 | 59991,75 |
Benchmark of digital sensor read
Benchmark of analog sensor read
Benchmark of pi calculation
Test programs:
Time precision benchmark
void setup() { Serial.begin(9600); } void loop() { while (true) { unsigned long start = millis(); delay(60000); unsigned elap = millis() - start; Serial.println(elap); } }