a sadeghioon / Mbed 2 deprecated reciever

Dependencies:   mbed

Committer:
axm904
Date:
Wed Sep 21 14:34:24 2011 +0000
Revision:
0:f04f6d613205

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
axm904 0:f04f6d613205 1 #include "mbed.h"
axm904 0:f04f6d613205 2 Serial pc(USBTX, USBRX);
axm904 0:f04f6d613205 3 Serial erad(p9, p10);
axm904 0:f04f6d613205 4 char tex;
axm904 0:f04f6d613205 5 int stat=0;
axm904 0:f04f6d613205 6 int main() {
axm904 0:f04f6d613205 7 erad.baud(19200);
axm904 0:f04f6d613205 8 while(1) {
axm904 0:f04f6d613205 9 stat=erad.readable();
axm904 0:f04f6d613205 10 if(stat>0){
axm904 0:f04f6d613205 11 erad.scanf("%s",&tex);
axm904 0:f04f6d613205 12 pc.printf("%s",tex);
axm904 0:f04f6d613205 13 }
axm904 0:f04f6d613205 14 }
axm904 0:f04f6d613205 15 }