View previous topic :: View next topic |
Author |
Message |
NB_CAD
Joined: 11 Sep 2014 Posts: 7 Location: Newport Beach,CA
|
SIOW Clear Screen / move cursor |
Posted: Mon Jul 27, 2015 6:35 pm |
|
|
Is there a character sequence that will clear screen when using the SIOW serial monitor?
Can the cursor be moved?
Does it emulate any terminal commands? |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1933 Location: Norman, OK
|
|
Posted: Mon Jul 27, 2015 7:28 pm |
|
|
The SIOW will respond to VT100 esc sequences _________________ Google and Forum Search are some of your best tools!!!! |
|
|
NB_CAD
Joined: 11 Sep 2014 Posts: 7 Location: Newport Beach,CA
|
|
Posted: Tue Jul 28, 2015 6:17 am |
|
|
I tried this without success. Here is my code to make a simple oscilloscope. I tried using the Graph but found it to be slow and had difficulty to make it reset reliably. Also it is less universal.
Code: |
printf("Points Collected => %3u \n\r",plotPoints);
for (i=160; i>0 ;i-=10){
outString="";
for (int8 plotIndex =0; plotIndex<plotPoints; plotIndex++){
if (plotArray[plotIndex]>i) {
strcat(outString,"X");
}else{
strcat(outString," ");
}
}
printf(outString);printf("\r\n");
}
printf("\r\n Clearing ");
delay_ms(100); // Whenever in doubt I delay
printf("\x1b[2J"); // CLEAR SCREEN CODES ????
delay_ms(2000);
printf(" Clear ");
|
Result -->
X
XXX XXX X
XXXXX XXX X
XXXXXXXXX X
XXXXXXXXXX XX
XXXXXXXXXX XX
XXXXXXXXXX XX
XXXXXXXXXX XX
XXXXXXXXXX XX
XXXXXXXXXX XX
XXXXXXXXXX XXX
XXXXXXXXXXX XXX
XXXXXXXXXXX XXX
XXXXXXXXXXX XXXX
XXXXXXXXXXXXX XXXXX
Clearing [2J Clear Points Collected => 65
X
XXX XXX
XXXXX XXX X
XXXXXXXXX X
XXXXXXXXXX XX
XXXXXXXXXX XX
XXXXXXXXXX XX
XXXXXXXXXX XX
XXXXXXXXXX XX
XXXXXXXXXX XX
XXXXXXXXXX XXX
XXXXXXXXXXX XXX
XXXXXXXXXXX XXX
XXXXXXXXXXX XXXX
XXXXXXXXXXXX XXXXX
Clearing
I appreciate your assistance. |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1933 Location: Norman, OK
|
|
Posted: Tue Jul 28, 2015 12:33 pm |
|
|
printf("\033[2J"); // clear screen
printf("\033[H"); // home the cursor _________________ Google and Forum Search are some of your best tools!!!! |
|
|
NB_CAD
Joined: 11 Sep 2014 Posts: 7 Location: Newport Beach,CA
|
|
Posted: Tue Jul 28, 2015 8:14 pm |
|
|
Thank you for your help. Your code is clean and works well although I needed to run the program on Tera Term.
I like the SIOW since my product is developed from the RapidUSB. It allows me to develop without needing to use my ICD64. Ultimately i will need to run the product on another terminal emulator (Unless I am missing a configuration setting for the SIOW.)
Image of the ASCII plot diagnostic screen with level information.
[img]https://dl.dropboxusercontent.com/u/61824884/Plot%20with%20Sonar.PNG [/img][img][/img] |
|
|
|