Hi Roger,
I'm using CoolTerm on Mac to communicate with Arduino (Mega 2560). I faced the problem: I need to print in CoolTerm' window on the same line (without Line Feed).
In my Arduino sketch I did:
".........
Serial.print("CH1="); Serial.print(AcVal1); Serial.print("\r");
........."
In the CoolTerm' window I got:
".........
CH1=0
CH1=0
CH1=0
.........." (CoolTerm added LF himself while printing)
I tried diff CoolTerm settings without results. Could you please help on this?
Thanks.
CoolTerm and Carriage Return
- roger
- Site Admin
- Posts: 431
- Joined: Fri Apr 24, 2009 12:41 am
- Contact:
Re: CoolTerm and Carriage Return
Hi,
Try removing the Serial.print("\r"); statement from your Arduino code. I believe that this is what is causing the LF.
Roger
Try removing the Serial.print("\r"); statement from your Arduino code. I believe that this is what is causing the LF.
Roger
-
- Posts: 2
- Joined: Sat Nov 01, 2014 9:13 pm
Re: CoolTerm and Carriage Return
Have found this topic. It seems the problem is not solved. Or am I wrong?
Output in HyperTerminal after the code Serial.print ("\ r"); remains in the same row.
But Coolterm adds LF.
Please see screen shot for different programs, but the same output Serial.print ("\ r");
http://www.triumph.ru/coolterm/Terminals.jpg
Could you help me solve this problem?
Output in HyperTerminal after the code Serial.print ("\ r"); remains in the same row.
But Coolterm adds LF.
Please see screen shot for different programs, but the same output Serial.print ("\ r");
http://www.triumph.ru/coolterm/Terminals.jpg
Could you help me solve this problem?
- roger
- Site Admin
- Posts: 431
- Joined: Fri Apr 24, 2009 12:41 am
- Contact:
Re: CoolTerm and Carriage Return
What you are seeing is actually expected behavior. CoolTerm is not designed to behave like applications that support terminal emulation. It was specifically designed to display ALL the data that is received. Thus, a CR character causes a new line to be displayed rather than the previous line being overwritten.
However, if it is important to you that only the last line of data is displayed, the you can reduce the receive buffer size to the number of bytes the line contains. It appears your data is always exactly 16 bytes long. If you set the receive buffer size to 16, CoolTerm will only show the last 16 bytes it received.
You can also turn off the option to convert non-readable characters so that the TAB characters don't show as dots.
However, if it is important to you that only the last line of data is displayed, the you can reduce the receive buffer size to the number of bytes the line contains. It appears your data is always exactly 16 bytes long. If you set the receive buffer size to 16, CoolTerm will only show the last 16 bytes it received.
You can also turn off the option to convert non-readable characters so that the TAB characters don't show as dots.
-
- Posts: 2
- Joined: Sat Nov 01, 2014 9:13 pm
Re: CoolTerm and Carriage Return
Thank you for your answer.
It is a pity that it is impossible to stay on the same row.
It is a pity that it is impossible to stay on the same row.
- roger
- Site Admin
- Posts: 431
- Joined: Fri Apr 24, 2009 12:41 am
- Contact:
Re: CoolTerm and Carriage Return
I'm currently working on a new feature that might solve your problem. It won't implement a carriage return to go back to the beginning of the current line, but it will let you clear the screen before sending new data. This would eventually produce the same visual result. Send me a private message if you're interested in testing this.nkp07 wrote:Thank you for your answer.
It is a pity that it is impossible to stay on the same row.
-
- Posts: 2
- Joined: Fri Aug 28, 2015 12:10 am
Re: CoolTerm and Carriage Return
Hello Roger
CoolTerm for me is really the best terminal program out there. Thank you very much for it.
Would it be possible that you implement the "carriage return" or "backspace" please.
Maybe with a option to enable it in the "receive options".
Its the only reason why i sometimes have to use another terminal program, because
sometimes i want to refresh some data, instead of adding new one.
Best regards
crawler009
CoolTerm for me is really the best terminal program out there. Thank you very much for it.
Would it be possible that you implement the "carriage return" or "backspace" please.
Maybe with a option to enable it in the "receive options".
Its the only reason why i sometimes have to use another terminal program, because
sometimes i want to refresh some data, instead of adding new one.
Best regards
crawler009
- roger
- Site Admin
- Posts: 431
- Joined: Fri Apr 24, 2009 12:41 am
- Contact:
Re: CoolTerm and Carriage Return
Can you elaborate as to what you mean by "implement backspace and carriage return"?
-
- Posts: 2
- Joined: Fri Aug 28, 2015 12:10 am
Re: CoolTerm and Carriage Return
Hello Rogerroger wrote:Can you elaborate as to what you mean by "implement backspace and carriage return"?
what i mean is that if i send a CR to CoolTerm, it would be great if it isnt displayed,
instead the data that follows a CR, overwrites the last line chars (like hyperterminal does),
or maybe (for simplificatin) CR clears all the chars in the last line.
I'm just seeing in the Connetion Options -> Terminal -> "Handle BS and DEL Characters". It would be nice if a "Handle CR Characters" option would be there also.