I am trying to read long strings from the Serial, using arduino. In order to spare some RAM I don’t use Serial.readString(). I use Serial.read() instead.
During the reading, I also print some debug info to the same Serial port.
Let's say I send 90 characters to the Serial from the PC. I read them with Serial.read(). If I call a few times Serial.println() between two calls of Serial.read(), I get only 67 character of 90 (
Serial.available()>0 is false).
I read all the 90 character when I don’t call Serial.println() at all.
Why? I was sure that it is possible to write to the serial and read from it simultaneously, that these are independent processes.
Am I wrong?