hi,
i'm sending datas from Arduino Mega to PC through Serial port at 115200 bps. I know that the Serial.print will store the output data to the OUT_PUT_BUFFER and it will return immediately, then another thread(?) will send the data? (but is arduino available for multithread?) and if the buffer is full, then the Serial.print will wait until it can add the output to the buffer. but i don't want my Serial.print to wait. i want to know the spare space of the buffer to judge whether to print or not. do you have any suggestions for me to know the spare space of the buffer?
Thanks for reading.
Lancy