Marlon Fulla / Mbed 2 deprecated 2014ENE20_XBEETESTROUT

Dependencies:   mbed

Revision:
1:273b1f91d518
Parent:
0:681c5f49ef09
Child:
2:ff11ef31aee5
--- a/main.cpp	Tue Jan 21 01:06:53 2014 +0000
+++ b/main.cpp	Sat Nov 21 21:48:39 2015 +0000
@@ -6,10 +6,12 @@
 
 
 Serial xbee(USBTX,USBRX);
+Timer reloj;
 
 string caracter,tira;
 int npack,delay,ncharacters;
 char read[64];
+int tiempo;
 
 int main()
 {
@@ -39,14 +41,20 @@
 //        cin>>recibido;
 //        cin>>delay;
          
+         reloj.start();
+         
         for(int i=1;  i<=npack ;i++) {
            //cout<<tira<<'\n';
            xbee.printf("%s",tira);
            wait_us(delay);
         }
+    
+        reloj.stop();
+        tiempo=reloj.read_us();
 
-           xbee.printf("D");
-           tira="";  
+           xbee.printf("%d",tiempo);
+           tira="";
+           reloj.reset();  
 
     }