Tera Term Terminal Emulator In this part of the Lab 4, you will set up the Tera
ID: 2078925 • Letter: T
Question
Tera Term Terminal Emulator
In this part of the Lab 4, you will set up the Tera Term terminal emulator.
Follow the steps given “Introduction to Tera Term Terminal Emulator" to set up Tera Term terminal emulator.
#include "mbed.h"
Serial pc(USBTX, USBRX);
int main() {
pc.printf("Hello World! ");
while (1){
pc.putc(pc.getc()+0);
}
})
Modify the code from above to do the following:
Display "Hello World!" and then go on to the beginning of the next line
When the user type the following paragraph, the same will be displayed on the screen.
abcdefg
hijklmn
opqrst
uvwxyz
Note: after each line the user will use "Enter" key of the keyboard to start a new line.
Explanation / Answer
#include "mbed.h"
Serial pc(USBTX, USBRX);
int main() {
Char temp;
pc.printf("Hello World! ");
while (1){
temp = pc.getc();
if ( temp == ‘ ’)
printf(“ ”);
else
pc.putc(pc.getc()+0);
}
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.