Nathan Hutton / Mbed 2 deprecated Terminal_test

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 
00003 //Very simple program to pass whatever the mbed reads on pins 9 and 10 to the computer
00004 //Baud by default is 9600, you can change this easily.
00005 
00006 Serial pc(USBTX, USBRX);
00007 Serial WIFI(p9,p10);
00008 
00009 
00010 int main() {
00011 
00012     pc.printf("\x1B[2J");
00013     pc.printf("\x1B[H");
00014     pc.printf("Simple Termial!\r\n");
00015 
00016     while (1) {
00017    
00018    
00019    while(pc.readable())WIFI.putc(pc.getc());
00020    while(WIFI.readable())pc.putc(WIFI.getc());
00021     
00022  }}