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.
Revision 0:39849589866c, committed 2018-09-30
- Comitter:
- danielgarciag
- Date:
- Sun Sep 30 21:15:01 2018 +0000
- Commit message:
- timer
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /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();
+}}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sun Sep 30 21:15:01 2018 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/e95d10626187 \ No newline at end of file