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:
- 0:39849589866c
diff -r 000000000000 -r 39849589866c main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Sun Sep 30 21:15:01 2018 +0000
@@ -0,0 +1,20 @@
+#include "mbed.h"
+
+
+Timer tiempo;
+Serial pc (USBTX,USBRX);
+DigitalIn BOTON (USER_BUTTON);
+
+
+int t=0;
+int main() {
+ while (1){
+ while (BOTON){}
+
+ tiempo.start();
+ while (!BOTON){}
+ tiempo.stop();
+ t= tiempo.read_ms();
+ pc.printf("%d\n",t);
+ tiempo.reset();
+}}