Hello everyone,
I was trying to evaluate the speed of communication from Arduino to pc, using this code in Arduino:
void setup() {
Serial.begin(250000);
}
void loop() {
Serial.println("Ciao Arduino");
}
and this in Python:
import time, serial
arduino = serial.Serial('/dev/cu.usbmodem1421', 250000)
time.sleep(3)
count = 0
start = time.time()
while True:
a = arduino.readline()
print a
count = count+1
time1 = time.time()
if time1-start >1 :
print "--" + str(count)
print a
count = 0
start=time1
Wich print out how many readline() it managed to do to evaluate the speed.
And I realized that Arduino Uno makes(at 400'000 baudrate or more) 2855 readline(), while the Micro achieved like 20'000.
I have learned that Micro baudrate is not "selectable" and it works always at the same speed; So, will it be better in my project that requires high speed for data from arduino to pc? Arduino Due would be an even better choice?
Thank you