xxx_Uhr_I2C_LCD_Delay_Bua

Dependencies:   LCD_i2C_JDS

Files at this revision

API Documentation at this revision

Comitter:
itbusch
Date:
Wed Feb 23 19:23:05 2022 +0000
Commit message:
xxx_Uhr_I2C_LCD_Delay_Bua

Changed in this revision

LCD_i2C_JDS.lib Show annotated file Show diff for this revision Revisions of this file
UP_Uhr.c Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-os.lib Show annotated file Show diff for this revision Revisions of this file
resources/official_armmbed_example_badge.png Show annotated file Show diff for this revision Revisions of this file
--- /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