1st publish.

Dependencies:   LCD_DISCO_F429ZI mbed BSP_DISCO_F429ZI

Committer:
haideriqbalm11
Date:
Fri Jul 26 12:49:20 2019 +0000
Revision:
0:8171200dad04
1st program.

Who changed what in which revision?

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