Tera Term Terminal Emulator In this part of the Lab 4, you will set up the Tera
ID: 3780649 • 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
the code needs to modified very slightly
int main()
{
pc.printf("Hello World ")
while(1)
{
pc.getc();
pc.putc(stdout);
}
}
stdout in putc indicates the return of value in print to standard output
and
as new line is also a character putc method accepts it as an input and since it is a non-prntable character it just leads to a new line
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.