Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BSP_DISCO_L476VG LCD_DISCO_L476VG
main.cpp
00001 #include "mbed.h" 00002 #include "LCD_DISCO_L476VG.h" 00003 00004 LCD_DISCO_L476VG lcd; 00005 00006 DigitalOut led_green(LED1); 00007 00008 int main() 00009 { 00010 uint8_t DisplayedString[7] = {0}; 00011 uint8_t title[] = " DISCOVERY STM32L476"; 00012 00013 printf("\nHello\n"); 00014 led_green = 1; 00015 lcd.Clear(); 00016 lcd.DisplayString((uint8_t *)"HELLO"); 00017 ThisThread::sleep_for(5000); 00018 led_green = 0; 00019 00020 while(1) { 00021 printf("Scroll sequence\n"); 00022 lcd.Clear(); 00023 lcd.ScrollSentence(title, 1, 400); 00024 lcd.Clear(); 00025 led_green = !led_green; 00026 00027 for(uint32_t BarNumber = 0; BarNumber <= 4; BarNumber++) { 00028 printf("BAR = %d\n", BarNumber); 00029 sprintf((char *)DisplayedString, "BAR %d", BarNumber); 00030 lcd.DisplayString(DisplayedString); 00031 lcd.BarLevelConfig((uint8_t)BarNumber); 00032 ThisThread::sleep_for(1000); 00033 } 00034 } 00035 }
Generated on Thu Jul 14 2022 13:53:18 by
1.7.2