Test

Dependencies:   BSP_DISCO_F429ZI LCD_DISCO_F429ZI mbed TS_DISCO_F429ZI

Committer:
jimk3038
Date:
Sat Jun 03 16:53:00 2017 +0000
Revision:
0:a564383a9b15
Child:
1:39992c325c58
Test1

Who changed what in which revision?

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