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
diff -r 000000000000 -r c1a408e17600 LCD_i2C_JDS.lib --- /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
diff -r 000000000000 -r c1a408e17600 UP_Uhr.c --- /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
diff -r 000000000000 -r c1a408e17600 main.cpp --- /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... + } + } +} + +
diff -r 000000000000 -r c1a408e17600 mbed-os.lib --- /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
diff -r 000000000000 -r c1a408e17600 resources/official_armmbed_example_badge.png Binary file resources/official_armmbed_example_badge.png has changed