Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- 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();
}