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: MaxSonar RTC-DS1307 TextLCD mbed
main.cpp
- Committer:
- SausageSausage
- Date:
- 2017-05-24
- Revision:
- 0:514ef400f75b
- Child:
- 1:aa2b8929a968
File content as of revision 0:514ef400f75b:
#include "mbed.h"
#include "TextLCD.h"
#include "Rtc_Ds1307.h"
Rtc_Ds1307 rtc(PTE0, PTE1);
TextLCD lcd(PTE4, PTE5, PTE20, PTE21, PTE22, PTE23); // rs, e, d4-d7
Serial pc(USBTX, USBRX);
int main() {
Rtc_Ds1307::Time_rtc tm = {};
rtc.startClock();
while(1) {
if (rtc.getTime(tm) ) {
lcd.printf("The time is :\n%02d:%02d:%02d", tm.hour, tm.min, tm.sec);
}
wait(1);
lcd.cls();
}
}