Clock program with alarm
Dependencies: MaxSonar RTC-DS1307 TextLCD mbed
Revision 5:518dd1a21359, committed 2017-05-26
- Comitter:
- SausageSausage
- Date:
- Fri May 26 10:49:13 2017 +0000
- Parent:
- 4:f7b32fcc75f8
- Commit message:
- Working (haha) code
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r f7b32fcc75f8 -r 518dd1a21359 main.cpp --- a/main.cpp Fri May 26 09:27:22 2017 +0000 +++ b/main.cpp Fri May 26 10:49:13 2017 +0000 @@ -4,8 +4,9 @@ Rtc_Ds1307 rtc(PTE0, PTE1); DigitalOut red(LED1); -TextLCD lcd(PTE5, PTE4, PTE3, PTE2, PTB11, PTB10); // rs, e, d4-d7 -DigitalIn pin(PTE29); //button +DigitalOut tog(PTE3); +TextLCD lcd(PTE30, PTE29, PTE23, PTE22, PTE21, PTE20); // rs, e, d4-d7 +DigitalIn pin(PTA1); //button Serial pc(USBTX, USBRX); Rtc_Ds1307::Time_rtc tim = {}; PwmOut boop(PTD4); //alarm buzzer @@ -21,6 +22,7 @@ int main() { + tog.write(1); boop.write(0); //initialise buzzer boop.period(5);