Lum_sensor usage with DISCO_L476VG

Dependencies:   BSP_DISCO_L476VG LCD_DISCO_L476VG

Files at this revision

API Documentation at this revision

Comitter:
cedric_jefferson
Date:
Wed Apr 01 11:55:19 2020 +0000
Commit message:
Initial commit

Changed in this revision

BSP_DISCO_L476VG.lib Show annotated file Show diff for this revision Revisions of this file
LCD_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
diff -r 000000000000 -r eefb178c8df7 BSP_DISCO_L476VG.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/BSP_DISCO_L476VG.lib	Wed Apr 01 11:55:19 2020 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/teams/ST/code/BSP_DISCO_L476VG/#4943b15cce9f
diff -r 000000000000 -r eefb178c8df7 LCD_DISCO_L476VG.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LCD_DISCO_L476VG.lib	Wed Apr 01 11:55:19 2020 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/teams/ST/code/LCD_DISCO_L476VG/#6ac2ed34f595
diff -r 000000000000 -r eefb178c8df7 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Apr 01 11:55:19 2020 +0000
@@ -0,0 +1,35 @@
+#include "mbed.h"
+#include "LCD_DISCO_L476VG.h"
+
+LCD_DISCO_L476VG lcd;
+
+DigitalOut led_green(LED1);
+
+int main()
+{
+    uint8_t DisplayedString[7] = {0};
+    uint8_t title[] = "      DISCOVERY STM32L476";
+  
+    printf("\nHello\n");
+    led_green = 1;
+    lcd.Clear();
+    lcd.DisplayString((uint8_t *)"HELLO");
+    ThisThread::sleep_for(5000);
+    led_green = 0;
+    
+    while(1) {
+        printf("Scroll sequence\n");
+        lcd.Clear();
+        lcd.ScrollSentence(title, 1, 400);
+        lcd.Clear();
+        led_green = !led_green;
+  
+        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 000000000000 -r eefb178c8df7 mbed-os.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-os.lib	Wed Apr 01 11:55:19 2020 +0000
@@ -0,0 +1,1 @@
+https://github.com/ARMmbed/mbed-os/#b81aeff1a3e171c6421984faa2cc18d0e35746c0