From subsecret
Jump to: navigation, search
No edit summary
No edit summary
Line 24: Line 24:
!Model
!Model
!size of double
!size of double
!duration (internal time used)
!duration (internal time used for measurement)
!pi value
!pi value
|-
|-
Line 33: Line 33:
|-
|-
|Arduino Mega 2560 (clone)
|Arduino Mega 2560 (clone)
|4
|
|
|
|3.1415972709
|
|}
|}



Revision as of 17:58, 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

Model size of double duration (internal time used for measurement) pi value
Arduino 101 8 3879 ms. 3.1415936536
Arduino Mega 2560 (clone) 4 3.1415972709



Test programs: Python program for measuring response time

import time
import serial
def millis():
    return int(round(time.time() * 1000))
ser = serial.Serial('/dev/ttyACM0', 9600)
while True:
	start = millis()
	data= "recv: "+ser.readline()	
	end = millis()
	print (end-start)
	print data


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);
  }
}