Jack Hansdampf / Mbed OS LCD_i2c_GSOE_Prog

Dependencies:   LCD_i2c_GSOE

Files at this revision

API Documentation at this revision

Comitter:
jack1930
Date:
Thu Mar 03 16:37:17 2022 +0000
Parent:
1:b020787ee237
Commit message:
cls locate putc

Changed in this revision

LCD_i2c_GSOE.lib 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
diff -r b020787ee237 -r 09ebe076281a LCD_i2c_GSOE.lib
--- a/LCD_i2c_GSOE.lib	Thu Nov 12 16:42:16 2020 +0000
+++ b/LCD_i2c_GSOE.lib	Thu Mar 03 16:37:17 2022 +0000
@@ -1,1 +1,1 @@
-https://os.mbed.com/users/jack1930/code/LCD_i2c_GSOE/#3bac0faac335
+https://os.mbed.com/users/jack1930/code/LCD_i2c_GSOE/#1d86cdba3ff5
diff -r b020787ee237 -r 09ebe076281a main.cpp
--- a/main.cpp	Thu Nov 12 16:42:16 2020 +0000
+++ b/main.cpp	Thu Mar 03 16:37:17 2022 +0000
@@ -12,86 +12,36 @@
 #define BLINKING_RATE_MS                                                    500
 
 lcd mylcd;
-RawSerial pc(USBTX, USBRX);
 
-char buf[16];  
-DigitalOut PC0(PC_0);
-
-
-static void print2LCD()
-{
-   char z;
-   int i=0;
-   /*if (PC0==0) PC0=1; //Kontrolle
-   else PC0=0;*/
-   do
-   {
-        z=pc.getc();
-        pc.putc(z);     //Echo
-        if (z>=0x20)    //nur lesbare Zeichen
-        { 
-            buf[i]=z;
-            i++;
-        }
-   }
-   while (z!=10);       //LF
-   buf[i]=0;
-   pc.abort_read(); //!!!!!!!!
-           
-    mylcd.cursorpos(0x40);
-    mylcd.printf("                ");
-    mylcd.cursorpos(0x40);
-    pc.printf("von MC %s",buf);     //Echo
-    mylcd.printf("-> %s",buf);
-}
 
 int main()
 {
-    pc.attach(&print2LCD);
-    pc.printf("Hello World !\n");
     mylcd.clear();
     mylcd.printf("Hallo Joerg");
     mylcd.cursorpos(0x40);
     DigitalOut led(LED1);
-    // Initalise PortB als 8Bit-Input Port mit Pullup
-    PortIn  eingabe(PortB,0xFF);
-    eingabe.mode(PullDown);
+    HAL_Delay(2000);
+    mylcd.cls();
+    mylcd.locate(4,1);
+    mylcd.printf("x=%d",2);
+    
+    HAL_Delay(2000);
+    mylcd.cls();
+    mylcd.locate(4,0);
+    mylcd.printf("Hallo");
+
+    HAL_Delay(2000);
+    mylcd.locate(8,1);
+    mylcd.putc('x');
+    mylcd.putc('Y');
+    mylcd.putc('z');
+    
+    
     while (true) {
-        if (eingabe==5) 
-            {
-                led = 1;
-            }
-        else 
-            {
-                led = !led;
-                thread_sleep_for(100);
-            }
-        /*
-        if (neu==true)
-        {
-           pc.abort_read();
-           
-           mylcd.cursorpos(0x40);
-           mylcd.printf("              ");
+        
+    }
 
-           mylcd.cursorpos(0x40);
-           
-           pc.printf("von MC %s",buf);
-           mylcd.printf("-> %s",buf); 
-           neu=false;   
-        }
-        */
-        /*
-        if (pc.readable()>0)
-        {
-           pc.scanf("%s", buf);
-           mylcd.cursorpos(0x40);
-           mylcd.printf("                ");
-           mylcd.cursorpos(0x40);
-           mylcd.printf("%s", buf);         
-        }
-        */
         
         
-    }
+    
 }
diff -r b020787ee237 -r 09ebe076281a mbed-os.lib
--- a/mbed-os.lib	Thu Nov 12 16:42:16 2020 +0000
+++ b/mbed-os.lib	Thu Mar 03 16:37:17 2022 +0000
@@ -1,1 +1,1 @@
-https://github.com/ARMmbed/mbed-os/#cf4f12a123c05fcae83fc56d76442015cb8a39e9
+https://github.com/ARMmbed/mbed-os/#b1796dedeb8accde1cbaecf136fab96895e23d81