0

I have connected an arduino serial port to my PC and monitoring the output in realterm. I am trying to print: CR 11.98,123,3520,01CRLF

But it is resulting with some delay. First CR 1 Is printed. After sometime, say 0.25sec, the rest of the data (1.98,123,3520,01CRLF) is received. Finally its shown like CR 11.98,123,3520,01CRLF

Why is there a delay between CR1 and the rest of the characters when printing using a single serial print!?

Serial.print("\r11.98," +string1+","+string2+",01"\r\n);

string1 & string2 hold data values from 2 separate sensors.

  • I will receive sensor values and calculate and store them in the names of string1 & string2. Because the data that i am displaying are in diff data types. So i save them as string and display – Girinath Periyasamy Sep 18 '19 at 2:32
  • 2
    Please include a full working example, that shows this problem in your question. – chrisl Sep 18 '19 at 6:47
  • Please don't try and concatenate Strings and string literals. It's just nasty. Really nasty. Just print each portion separately. – Majenko Sep 18 '19 at 10:56
  • For your information, i printed each portion separately. Output mid-delay was there. I changed the code as like the post. Still i got the same... So i need solution alone... – Girinath Periyasamy Sep 18 '19 at 15:32
  • You still did not show a full working example. “Full” = something that defines both setup() and loop() and can be compiled and tested. – Edgar Bonet Sep 25 '19 at 7:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.