In Arduino, SUCCESS ->Serial.println("test"); FAIL -> Serial.print("test\n");
jeongcatfish opened this issue · comments
Hi!
First, Thank you for share amazing code! It's really helpful.
I have some problem reading com port.
It's really working fine when I programed arduino like Serial.println("test");
but Serial.print("test\n"); isn't working..
How can I communicate not using Serial.println? just Serial.print
Thank you.!
Hello!
Thanks for using Ardity!
In Arduino, Serial.println
prints the same string as Serial.print
but followed by two extra characters: \r
and \n
. So in order to use Serial.print
in your example, you should do:
Serial.print("test\r\n");
Source: https://www.arduino.cc/reference/en/language/functions/communication/serial/println/
Regards.