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 4:ceb67991be6b, committed 2015-11-30
- Comitter:
- josedaparte
- Date:
- Mon Nov 30 19:47:35 2015 +0000
- Parent:
- 3:a3c969ad9f9a
- Commit message:
- jfj
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Nov 30 19:12:36 2015 +0000
+++ b/main.cpp Mon Nov 30 19:47:35 2015 +0000
@@ -9,18 +9,23 @@
int main()
{
lcd.cls();
+ t.start();
do
- {
- seg= t.start();
+ {
+
+ seg = t.read();
if(seg == 60)
{
+ seg=0;
+ t.reset();
min++;
- seg=0;
+
}
if(min==60)
{
+ min=0;
hora++;
- min=0;
+
}
if(hora==24)
{
@@ -31,5 +36,5 @@
lcd.printf("%i:%i:%i", hora, min, seg);
} while(1);
- lcd.printf("tiempo");
+
}