Lehrer Busch
/
xxx_Uhr_I2C_LCD_Delay_Bua
xxx_Uhr_I2C_LCD_Delay_Bua
Revision 0:c1a408e17600, committed 2022-02-23
- Comitter:
- itbusch
- Date:
- Wed Feb 23 19:23:05 2022 +0000
- Commit message:
- xxx_Uhr_I2C_LCD_Delay_Bua
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/LCD_i2C_JDS.lib Wed Feb 23 19:23:05 2022 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/itbusch/code/LCD_i2C_JDS/#43e25c35d0c1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/UP_Uhr.c Wed Feb 23 19:23:05 2022 +0000 @@ -0,0 +1,9 @@ + + + + + +/* +*/ + + \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Feb 23 19:23:05 2022 +0000 @@ -0,0 +1,60 @@ +/* mbed BuschA, */ +#include "mbed.h" +#include "UP_Uhr.c" +#include "LCD.h" +#include "I2C_LCD_Ausgabe.h" + + +// Set the LCD address to 0x27 for a 16 chars and 2 line display + +lcd mylcd; + +int sec, minu, stud; + +void Ausgabe_LCD (void) +{ + mylcd.cursorpos(0x00); + mylcd.printf(" Uhrzeit:"); + mylcd.cursorpos(0x40); + mylcd.printf(" %2d h: m:%2d s:%2d ",stud, minu, sec); +} + + +void Uhr (void) +{ + sec = sec + 1; + if (sec == 60) + { + minu ++; + sec = 0; + + if (minu == 60) + { + stud ++; + minu = 0; + + if (stud == 24) + { + stud = 0; + } + } + } + } + +int main() +{ + mylcd.clear(); + + + while (true) + { + + { + Uhr(); + Ausgabe_LCD(); + thread_sleep_for(1000); //Sleep = Warten... + } + } +} + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-os.lib Wed Feb 23 19:23:05 2022 +0000 @@ -0,0 +1,1 @@ +https://github.com/ARMmbed/mbed-os/#8ef0a435b2356f8159dea8e427b2935d177309f8
Binary file resources/official_armmbed_example_badge.png has changed