1st Steps *D*o *N*ot *C*are -> DNC

Dependencies:   LCD_DISCO_F429ZI mbed BSP_DISCO_F429ZI

Committer:
gograph_gmx_de
Date:
Sat Jul 31 12:46:50 2021 +0000
Revision:
0:3930b0a0398d
import&1stbuild OK

Who changed what in which revision?

UserRevisionLine numberNew contents of line
gograph_gmx_de 0:3930b0a0398d 1 #include "mbed.h"
gograph_gmx_de 0:3930b0a0398d 2 #include "LCD_DISCO_F429ZI.h"
gograph_gmx_de 0:3930b0a0398d 3
gograph_gmx_de 0:3930b0a0398d 4 LCD_DISCO_F429ZI lcd;
gograph_gmx_de 0:3930b0a0398d 5
gograph_gmx_de 0:3930b0a0398d 6 DigitalOut led1(LED1);
gograph_gmx_de 0:3930b0a0398d 7
gograph_gmx_de 0:3930b0a0398d 8 int main()
gograph_gmx_de 0:3930b0a0398d 9 {
gograph_gmx_de 0:3930b0a0398d 10 led1 = 1;
gograph_gmx_de 0:3930b0a0398d 11
gograph_gmx_de 0:3930b0a0398d 12 BSP_LCD_SetFont(&Font20);
gograph_gmx_de 0:3930b0a0398d 13 lcd.DisplayStringAt(0, LINE(1), (uint8_t *)"MBED EXAMPLE", CENTER_MODE);
gograph_gmx_de 0:3930b0a0398d 14 wait(1);
gograph_gmx_de 0:3930b0a0398d 15
gograph_gmx_de 0:3930b0a0398d 16 while(1)
gograph_gmx_de 0:3930b0a0398d 17 {
gograph_gmx_de 0:3930b0a0398d 18 lcd.Clear(LCD_COLOR_BLUE);
gograph_gmx_de 0:3930b0a0398d 19 lcd.SetBackColor(LCD_COLOR_BLUE);
gograph_gmx_de 0:3930b0a0398d 20 lcd.SetTextColor(LCD_COLOR_WHITE);
gograph_gmx_de 0:3930b0a0398d 21 wait(0.3);
gograph_gmx_de 0:3930b0a0398d 22 lcd.DisplayStringAt(0, LINE(4), (uint8_t *)"DISCOVERY", CENTER_MODE);
gograph_gmx_de 0:3930b0a0398d 23 lcd.DisplayStringAt(0, LINE(5), (uint8_t *)"STM32F429ZI", CENTER_MODE);
gograph_gmx_de 0:3930b0a0398d 24 wait(1);
gograph_gmx_de 0:3930b0a0398d 25
gograph_gmx_de 0:3930b0a0398d 26 lcd.Clear(LCD_COLOR_GREEN);
gograph_gmx_de 0:3930b0a0398d 27
gograph_gmx_de 0:3930b0a0398d 28 lcd.SetTextColor(LCD_COLOR_BLUE);
gograph_gmx_de 0:3930b0a0398d 29 lcd.FillRect(10, 20, 50, 50);
gograph_gmx_de 0:3930b0a0398d 30 wait(0.1);
gograph_gmx_de 0:3930b0a0398d 31 lcd.SetTextColor(LCD_COLOR_BROWN);
gograph_gmx_de 0:3930b0a0398d 32 lcd.FillCircle(80, 80, 50);
gograph_gmx_de 0:3930b0a0398d 33 wait(0.1);
gograph_gmx_de 0:3930b0a0398d 34 lcd.SetTextColor(LCD_COLOR_YELLOW);
gograph_gmx_de 0:3930b0a0398d 35 lcd.FillEllipse(150, 150, 50, 100);
gograph_gmx_de 0:3930b0a0398d 36 wait(0.1);
gograph_gmx_de 0:3930b0a0398d 37 lcd.SetTextColor(LCD_COLOR_RED);
gograph_gmx_de 0:3930b0a0398d 38 lcd.FillCircle(200, 200, 40);
gograph_gmx_de 0:3930b0a0398d 39 wait(1);
gograph_gmx_de 0:3930b0a0398d 40
gograph_gmx_de 0:3930b0a0398d 41 lcd.SetBackColor(LCD_COLOR_ORANGE);
gograph_gmx_de 0:3930b0a0398d 42 lcd.SetTextColor(LCD_COLOR_CYAN);
gograph_gmx_de 0:3930b0a0398d 43 BSP_LCD_SetFont(&Font24);
gograph_gmx_de 0:3930b0a0398d 44 lcd.DisplayStringAt(0, LINE(7), (uint8_t *)"HAVE FUN !!!", CENTER_MODE);
gograph_gmx_de 0:3930b0a0398d 45 wait(1);
gograph_gmx_de 0:3930b0a0398d 46
gograph_gmx_de 0:3930b0a0398d 47 led1 = !led1;
gograph_gmx_de 0:3930b0a0398d 48 wait(0.5);
gograph_gmx_de 0:3930b0a0398d 49 }
gograph_gmx_de 0:3930b0a0398d 50 }
gograph_gmx_de 0:3930b0a0398d 51