Basic example showing how to drive the Glass LCD.

Dependencies:   BSP_DISCO_L476VG LCD_DISCO_L476VG

Files at this revision

API Documentation at this revision

Comitter:
jeromecoutant
Date:
Wed Sep 25 10:01:01 2019 +0200
Parent:
5:b392d402af6a
Commit message:
Update with CubeL4 V1.14.0

Changed in this revision

BSP_DISCO_L476VG.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
mbed.bld Show diff for this revision Revisions of this file
diff -r b392d402af6a -r d3f6c05a5ae0 BSP_DISCO_L476VG.lib
--- a/BSP_DISCO_L476VG.lib	Thu Dec 20 13:50:20 2018 +0000
+++ b/BSP_DISCO_L476VG.lib	Wed Sep 25 10:01:01 2019 +0200
@@ -1,1 +1,1 @@
-https://developer.mbed.org/teams/ST/code/BSP_DISCO_L476VG/#472232f07925
+https://developer.mbed.org/teams/ST/code/BSP_DISCO_L476VG/#4943b15cce9f
diff -r b392d402af6a -r d3f6c05a5ae0 main.cpp
--- a/main.cpp	Thu Dec 20 13:50:20 2018 +0000
+++ b/main.cpp	Wed Sep 25 10:01:01 2019 +0200
@@ -7,30 +7,29 @@
 
 int main()
 {
-    uint32_t temp = 0;
-    uint8_t stemp[7] = {0};
+    uint8_t DisplayedString[7] = {0};
     uint8_t title[] = "      DISCOVERY STM32L476";
   
-    printf("Hello\n");
+    printf("\nHello\n");
     led_green = 1;
     lcd.Clear();
     lcd.DisplayString((uint8_t *)"HELLO");
-    wait(1);
-    
-    printf("Scroll sequence\n");
+    ThisThread::sleep_for(5000);
     led_green = 0;
-    lcd.Clear();
-    lcd.ScrollSentence(title, 2, 200);
-    lcd.Clear();
-  
+    
     while(1) {
-        printf("BAR = %d\n", temp);
-        sprintf((char *)stemp, "BAR %d", temp);
-        lcd.DisplayString(stemp);
-        lcd.BarLevelConfig((uint8_t)temp);
-        temp++;
-        if (temp > 4) temp = 0;
+        printf("Scroll sequence\n");
+        lcd.Clear();
+        lcd.ScrollSentence(title, 1, 400);
+        lcd.Clear();
         led_green = !led_green;
-        wait(1);
+  
+        for(uint32_t BarNumber = 0; BarNumber <= 4; BarNumber++) {
+            printf("BAR = %d\n", BarNumber);
+            sprintf((char *)DisplayedString, "BAR %d", BarNumber);
+            lcd.DisplayString(DisplayedString);
+            lcd.BarLevelConfig((uint8_t)BarNumber);
+            ThisThread::sleep_for(1000);
+        }
     }
 }
diff -r b392d402af6a -r d3f6c05a5ae0 mbed-os.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-os.lib	Wed Sep 25 10:01:01 2019 +0200
@@ -0,0 +1,1 @@
+https://github.com/ARMmbed/mbed-os/#b81aeff1a3e171c6421984faa2cc18d0e35746c0
diff -r b392d402af6a -r d3f6c05a5ae0 mbed.bld
--- a/mbed.bld	Thu Dec 20 13:50:20 2018 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-https://os.mbed.com/users/mbed_official/code/mbed/builds/3a7713b1edbc
\ No newline at end of file