Hi,
I have just run the following code on the Arduino Hardware and it displays as expected on the Arduino serial monitor.
[code]/*Uses a FOR loop for data and prints a number in various formats.*/
int x = 0; // variable
void setup() {
Serial.begin(9600); // open the serial port at 9600 bps:
// print labels
Serial.print("None"); // prints a label
Serial.print("\t"); // prints a tab
Serial.print("DEC");
Serial.print("\t");
Serial.print("HEX");
Serial.print("\t");
Serial.print("OCT");
Serial.print("\t");
Serial.println("BIN");
for(x=65; x< 91; x++){ // only part of the ASCII chart, change to suit
// print it out in many formats:
Serial.print(x); // print as an ASCII-encoded decimal - same as "DEC"
Serial.print("\t"); // prints a tab
Serial.print(x, DEC); // print as an ASCII-encoded decimal
Serial.print("\t"); // prints a tab
Serial.print(x, HEX); // print as an ASCII-encoded hexadecimal
Serial.print("\t"); // prints a tab
Serial.print(x, OCT); // print as an ASCII-encoded octal
Serial.print("\t"); // prints a tab
Serial.println(x, BIN); // print as an ASCII-encoded binary
// then adds the carriage return with "println"
delay(200); // delay 200 milliseconds
}
Serial.println(""); // prints another carriage return
}
void loop() {
delay (2000);
}
[/code]
However when I try to simulate it using ISIS - the tabs do not work on the terminal. (All the text is grouped together)
I have tried every terminal type and none seem to work.
It is most likely something simple. Any ideas?
Thank you
FJF
Tabs ignored on terminal ?
Re: Tabs ignored on terminal ?
Horizontal and vertical tabs are not supported with virtual terminal. From Virtual Instruments help file:
The Virtual Terminal supports the ASCII control codes CR (0Dh), BS (0x08h) and BEL (0x07h). All other codes including LF (0x0A) are ignored.
The Virtual Terminal supports the ASCII control codes CR (0Dh), BS (0x08h) and BEL (0x07h). All other codes including LF (0x0A) are ignored.
Kind regards,
Ettore Arena - Labcenter Electronics.
Ettore Arena - Labcenter Electronics.