a sadeghioon / Mbed 2 deprecated reciever

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 Serial pc(USBTX, USBRX);
00003 Serial erad(p9, p10);
00004 char tex;
00005 int stat=0;
00006 int main() {
00007 erad.baud(19200);
00008     while(1) {
00009     stat=erad.readable();
00010     if(stat>0){  
00011               erad.scanf("%s",&tex);
00012               pc.printf("%s",tex);            
00013         }
00014         }
00015 }