Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Serial Monitor window and control characters (Read 3360 times)
Hanilein
Newbies
*
Offline


Posts: 6
Location: New Zealand
Joined: Nov 26th, 2014
Serial Monitor window and control characters
May 1st, 2015 at 11:52pm
Print Post  
Hello,
I need to print a value on the same position of the Serial Window again and again - like a elapsed time just at the beginning of a line without proceeding to the next line. 
The bare minimum for this to work is the functionality of the Carriage Return character '\r'. This way I could just print the value and stay in the same line. But it simply does not work with the Visual Micro Serial Monitor window.

The only functional character that is recognised is the New Line '\n' which does exactly what I don't want - placing the cursor to a new line.

Other terminal programs like HyperTerminal are working fine. How can I achieve this behaviour in the Serial Monitor?

Cheers

Hanilein

  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Serial Monitor window and control characters
Reply #1 - May 2nd, 2015 at 12:30am
Print Post  
Hi,

Why do you need the \r or \n. If the separator is for your own processing why not use a pipe symbol ||

How about?

Code
Select All
Serial.print("1");
Serial.print("|2");
Serial.print("|3");
 



Produces 

Code
Select All
1|2|3 



or

Code
Select All
Serial.print("1");
Serial.print("2");
Serial.print("3");
 



Produces 

Code
Select All
123 





If the tool bar has "Debug" selected then Visual Micro will often wait for a \n before printing the values to the monitor. In this case after the entire packet is complete send a \n or use :-

Code
Select All
Serial.println(); 



note: To switch off debug, the tool bar to a different configuration that does not contain the word "Debug" or untick "tools>visual micro>automatic debugging"
« Last Edit: May 2nd, 2015 at 12:31am by Tim@Visual Micro »  
Back to top
IP Logged
 
Hanilein
Newbies
*
Offline


Posts: 6
Location: New Zealand
Joined: Nov 26th, 2014
Re: Serial Monitor window and control characters
Reply #2 - May 2nd, 2015 at 4:25am
Print Post  
Hi,

the objective is to have a screen output like a clock on a terminal that changes every second (like clocks do) without carriage return. 

My program will generate lots of output and I only want to change a small bit of that information on the screen without scrolling and re-printing the whole screen over and over again.

Cheers

Hani


  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint