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 mbed
Fork of DISCO_L476VG_GlassLCD by
main.cpp@2:16502e83726a, 2015-09-19 (annotated)
- Committer:
 - bcostm
 - Date:
 - Sat Sep 19 04:06:11 2015 +0000
 - Revision:
 - 2:16502e83726a
 - Parent:
 - 0:0ecb0cbf4c30
 - Child:
 - 5:a581e9699510
 
Remove license.
Who changed what in which revision?
| User | Revision | Line number | New contents of line | 
|---|---|---|---|
| bcostm | 0:0ecb0cbf4c30 | 1 | #include "mbed.h" | 
| bcostm | 0:0ecb0cbf4c30 | 2 | #include "LCD_DISCO_L476VG.h" | 
| bcostm | 0:0ecb0cbf4c30 | 3 | |
| bcostm | 0:0ecb0cbf4c30 | 4 | LCD_DISCO_L476VG lcd; | 
| bcostm | 0:0ecb0cbf4c30 | 5 | |
| bcostm | 0:0ecb0cbf4c30 | 6 | DigitalOut led_green(LED1); | 
| bcostm | 0:0ecb0cbf4c30 | 7 | |
| bcostm | 0:0ecb0cbf4c30 | 8 | int main() | 
| bcostm | 0:0ecb0cbf4c30 | 9 | { | 
| bcostm | 0:0ecb0cbf4c30 | 10 | uint32_t temp = 0; | 
| bcostm | 0:0ecb0cbf4c30 | 11 | uint8_t stemp[7] = {0}; | 
| bcostm | 0:0ecb0cbf4c30 | 12 | uint8_t title[] = " DISCOVERY STM32L476"; | 
| bcostm | 0:0ecb0cbf4c30 | 13 | |
| bcostm | 0:0ecb0cbf4c30 | 14 | printf("Hello\n"); | 
| bcostm | 0:0ecb0cbf4c30 | 15 | led_green = 1; | 
| bcostm | 0:0ecb0cbf4c30 | 16 | lcd.Clear(); | 
| bcostm | 0:0ecb0cbf4c30 | 17 | lcd.DisplayString((uint8_t *)"HELLO"); | 
| bcostm | 0:0ecb0cbf4c30 | 18 | wait(1); | 
| bcostm | 0:0ecb0cbf4c30 | 19 | |
| bcostm | 0:0ecb0cbf4c30 | 20 | printf("Scroll sequence\n"); | 
| bcostm | 0:0ecb0cbf4c30 | 21 | led_green = 0; | 
| bcostm | 0:0ecb0cbf4c30 | 22 | lcd.Clear(); | 
| bcostm | 0:0ecb0cbf4c30 | 23 | lcd.ScrollSentence(title, 2, 200); | 
| bcostm | 0:0ecb0cbf4c30 | 24 | lcd.Clear(); | 
| bcostm | 0:0ecb0cbf4c30 | 25 | |
| bcostm | 0:0ecb0cbf4c30 | 26 | while(1) { | 
| bcostm | 0:0ecb0cbf4c30 | 27 | printf("BAR = %d\n", temp); | 
| bcostm | 0:0ecb0cbf4c30 | 28 | sprintf((char *)stemp, "BAR %d", temp); | 
| bcostm | 0:0ecb0cbf4c30 | 29 | lcd.DisplayString(stemp); | 
| bcostm | 0:0ecb0cbf4c30 | 30 | lcd.BarLevelConfig((uint8_t)temp); | 
| bcostm | 0:0ecb0cbf4c30 | 31 | temp++; | 
| bcostm | 0:0ecb0cbf4c30 | 32 | if (temp > 4) temp = 0; | 
| bcostm | 0:0ecb0cbf4c30 | 33 | led_green = !led_green; | 
| bcostm | 0:0ecb0cbf4c30 | 34 | wait(1); | 
| bcostm | 0:0ecb0cbf4c30 | 35 | } | 
| bcostm | 0:0ecb0cbf4c30 | 36 | } | 
