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 Sending control characters to Serial window. (Read 7181 times)
nevereven
Junior Member
**
Offline


Posts: 59
Joined: Dec 5th, 2014
Sending control characters to Serial window.
Jan 23rd, 2015 at 5:40pm
Print Post  
Is there a way to send non-printable characters via the serial monitor tool?
  
Back to top
 
IP Logged
 
nevereven
Junior Member
**
Offline


Posts: 59
Joined: Dec 5th, 2014
Re: Sending control characters to Serial window.
Reply #1 - Jan 23rd, 2015 at 9:01pm
Print Post  
Also, it would be nice if there was a way to pause the Serial output.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Sending control characters to Serial window.
Reply #2 - Jan 24th, 2015 at 12:00am
Print Post  
Quote:
Is there a way to send non-printable characters via the serial monitor tool?


Yes I have been considering control chars but also some sort of macro/command syntax.

As concerns control chars how to you propose they would be best implemented? Using the normal keys along with "Alt" detection or by entering some special escape codes? Please give a few examples.

Quote:
Also, it would be nice if there was a way to pause the Serial output


You can do that. The monitor works like a normal visual studio output window. When you click into it the display pauses. You can then move about with mouse or keyboard, to resume you simply go to the end of the output text box. The output is cached while paused, when it continues the cache is flush to the screen.
  
Back to top
IP Logged
 
nevereven
Junior Member
**
Offline


Posts: 59
Joined: Dec 5th, 2014
Re: Sending control characters to Serial window.
Reply #3 - Jan 24th, 2015 at 4:16am
Print Post  
Thanks for the tip on pausing the Serial output. Nice to not use the connect checkbox in this capacity.

Tim@Visual Micro wrote on Jan 24th, 2015 at 12:00am:
Yes I have been considering control chars but also some sort of macro/command syntax.

As concerns control chars how to you propose they would be best implemented? Using the normal keys along with "Alt" detection or by entering some special escape codes? Please give a few examples.


I've not given this much thought, but here are a few ideas off the top of my head:
When the serial monitor's text box has focus, ctrl+Key would be interpreted as a control code. The problem is you loose other "Windows" control keys. The most obvious would be copy and paste. Might not be a big deal as you can always right-click and use context menu.

A different approach would be to have another button which brought up a context menu allowing the insertion of a control character, either by selecting from a list, or typing in the hex or decimal code.

Another approach is to use the context menu when clicking on the text box. There's already a "Insert Unicode control character" sub-menu, so this might make the most sense.



When entered, the control code would appear in the text box as the letter typed preceded by a ^, so to send an ESCAPE, you would press ctrl+[ and ^[ would appear in the text box. If you wanted to be really fancy, you could do like notepad++ and have unique symbols for each special character, usually a box with the two or three character code in it. That way you don't have to remember that ^I is a tab.
If you pressed backspace or delete, the ^ and the following letter would both be removed as a single unit.


I can see the value of some sort of macro functionality, but I'd probably just use a dedicated terminal program like SecureCRT, HyperAccess, etc. Perhaps the option to launch an external terminal program rather than the built in one?
  
Back to top
 
IP Logged
 
nevereven
Junior Member
**
Offline


Posts: 59
Joined: Dec 5th, 2014
Re: Sending control characters to Serial window.
Reply #4 - Mar 12th, 2016 at 4:56pm
Print Post  
Has this been implemented yet? I've got a GPS/GSM module I'm using with pass through and it needs a ctrl-Z from the terminal to end a message. If I right click, I can insert a unicode control character, but not a regular one.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Sending control characters to Serial window.
Reply #5 - Mar 13th, 2016 at 1:30pm
Print Post  
No not yet it's been a busy time with arduino changes but they say they have stopped now. So over the next month or so visual micro can stop changing what was working and start making new stuff Smiley
  
Back to top
IP Logged
 
nevereven
Junior Member
**
Offline


Posts: 59
Joined: Dec 5th, 2014
Re: Sending control characters to Serial window.
Reply #6 - Mar 13th, 2016 at 2:39pm
Print Post  
Thanks!
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Sending control characters to Serial window.
Reply #7 - Mar 20th, 2016 at 8:13pm
Print Post  
Try the new CStr setting on the Serial Monitor. 



Code (C++)
Select All
void setup()
{

	Serial.begin(115200);
}

void loop()
{
	while(Serial.available())
		Serial.write(Serial.read());
}
 

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