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.
Dependencies: mbed C12832_lcd
main.cpp
- Committer:
- mazmonem
- Date:
- 2018-11-09
- Revision:
- 0:275c29641333
- Child:
- 1:13aae0117bbf
File content as of revision 0:275c29641333:
#include "mbed.h"
#include "C12832_lcd.h"
C12832_LCD lcd;
Timeout increment;
 
 int hours=0;
 int minutes=0;
 
 void adj_min() {
 if (minutes>59) {
hours++;
minutes=0;
}
}
void inc_min() {
minutes++;
adj_min() ;
if (hours>23) {
    hours = 0;
    }
} 
int main() {
  while(true) {
      increment.attach(&inc_min, 60.0);
    }
     lcd.cls();
    lcd.locate(0,15);
    lcd.printf("%d", minutes);
}