Projet d'electronique
Dependencies: BSP_DISCO_F429ZI LCD_DISCO_F429ZI mbed
main.cpp@4:78121c0d5a5e, 2018-02-17 (annotated)
- Committer:
- toplexil74
- Date:
- Sat Feb 17 14:22:51 2018 +0000
- Revision:
- 4:78121c0d5a5e
- Parent:
- 3:cf3606d19cfe
- Child:
- 5:f8092b880eec
test 2
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Alex_mln | 0:e267ad382666 | 1 | #include "mbed.h" |
Alex_mln | 0:e267ad382666 | 2 | #include "LCD_DISCO_F429ZI.h" |
Alex_mln | 0:e267ad382666 | 3 | |
Alex_mln | 0:e267ad382666 | 4 | LCD_DISCO_F429ZI lcd; |
Alex_mln | 0:e267ad382666 | 5 | |
Alex_mln | 1:8d0030939469 | 6 | |
Alex_mln | 3:cf3606d19cfe | 7 | Test 1 |
toplexil74 | 4:78121c0d5a5e | 8 | Test 2 |
Alex_mln | 1:8d0030939469 | 9 | |
Alex_mln | 2:bca1de0a3a91 | 10 | Romane la nulle stp |
Alex_mln | 1:8d0030939469 | 11 | |
Alex_mln | 1:8d0030939469 | 12 | |
Alex_mln | 1:8d0030939469 | 13 | |
Alex_mln | 1:8d0030939469 | 14 | |
Alex_mln | 1:8d0030939469 | 15 | |
Alex_mln | 1:8d0030939469 | 16 | |
Alex_mln | 1:8d0030939469 | 17 | |
Alex_mln | 0:e267ad382666 | 18 | DigitalOut led1(LED1); |
Alex_mln | 0:e267ad382666 | 19 | |
Alex_mln | 0:e267ad382666 | 20 | int main() |
Alex_mln | 0:e267ad382666 | 21 | { |
Alex_mln | 0:e267ad382666 | 22 | led1 = 1; |
Alex_mln | 0:e267ad382666 | 23 | |
Alex_mln | 0:e267ad382666 | 24 | BSP_LCD_SetFont(&Font20); |
Alex_mln | 0:e267ad382666 | 25 | lcd.DisplayStringAt(0, LINE(1), (uint8_t *)"MBED EXAMPLE", CENTER_MODE); |
Alex_mln | 0:e267ad382666 | 26 | wait(1); |
Alex_mln | 0:e267ad382666 | 27 | |
Alex_mln | 0:e267ad382666 | 28 | while(1) |
Alex_mln | 0:e267ad382666 | 29 | { |
Alex_mln | 0:e267ad382666 | 30 | lcd.Clear(LCD_COLOR_BLUE); |
Alex_mln | 0:e267ad382666 | 31 | lcd.SetBackColor(LCD_COLOR_BLUE); |
Alex_mln | 0:e267ad382666 | 32 | lcd.SetTextColor(LCD_COLOR_WHITE); |
Alex_mln | 0:e267ad382666 | 33 | wait(0.3); |
Alex_mln | 0:e267ad382666 | 34 | lcd.DisplayStringAt(0, LINE(4), (uint8_t *)"DISCOVERY", CENTER_MODE); |
Alex_mln | 0:e267ad382666 | 35 | lcd.DisplayStringAt(0, LINE(5), (uint8_t *)"STM32F429ZI", CENTER_MODE); |
Alex_mln | 0:e267ad382666 | 36 | wait(1); |
Alex_mln | 0:e267ad382666 | 37 | |
Alex_mln | 0:e267ad382666 | 38 | lcd.Clear(LCD_COLOR_GREEN); |
Alex_mln | 0:e267ad382666 | 39 | |
Alex_mln | 0:e267ad382666 | 40 | lcd.SetTextColor(LCD_COLOR_BLUE); |
Alex_mln | 0:e267ad382666 | 41 | lcd.FillRect(10, 20, 50, 50); |
Alex_mln | 0:e267ad382666 | 42 | wait(0.1); |
Alex_mln | 0:e267ad382666 | 43 | lcd.SetTextColor(LCD_COLOR_BROWN); |
Alex_mln | 0:e267ad382666 | 44 | lcd.FillCircle(80, 80, 50); |
Alex_mln | 0:e267ad382666 | 45 | wait(0.1); |
Alex_mln | 0:e267ad382666 | 46 | lcd.SetTextColor(LCD_COLOR_YELLOW); |
Alex_mln | 0:e267ad382666 | 47 | lcd.FillEllipse(150, 150, 50, 100); |
Alex_mln | 0:e267ad382666 | 48 | wait(0.1); |
Alex_mln | 0:e267ad382666 | 49 | lcd.SetTextColor(LCD_COLOR_RED); |
Alex_mln | 0:e267ad382666 | 50 | lcd.FillCircle(200, 200, 40); |
Alex_mln | 0:e267ad382666 | 51 | wait(1); |
Alex_mln | 0:e267ad382666 | 52 | |
Alex_mln | 0:e267ad382666 | 53 | lcd.SetBackColor(LCD_COLOR_ORANGE); |
Alex_mln | 0:e267ad382666 | 54 | lcd.SetTextColor(LCD_COLOR_CYAN); |
Alex_mln | 0:e267ad382666 | 55 | BSP_LCD_SetFont(&Font24); |
Alex_mln | 0:e267ad382666 | 56 | lcd.DisplayStringAt(0, LINE(7), (uint8_t *)"HAVE FUN !!!", CENTER_MODE); |
Alex_mln | 0:e267ad382666 | 57 | wait(1); |
Alex_mln | 0:e267ad382666 | 58 | |
Alex_mln | 0:e267ad382666 | 59 | led1 = !led1; |
Alex_mln | 0:e267ad382666 | 60 | wait(0.5); |
Alex_mln | 0:e267ad382666 | 61 | } |
Alex_mln | 0:e267ad382666 | 62 | } |
Alex_mln | 0:e267ad382666 | 63 |