Learning project for NCUT2019 ESD students
Dependencies: LCD_DISCO_F429ZI mbed mbed-rtos BSP_DISCO_F429ZI
Revision 13:4752ccf82972, committed 2019-05-11
- Comitter:
- andrey001207
- Date:
- Sat May 11 02:51:59 2019 +0000
- Parent:
- 12:8679b4ebe162
- Commit message:
- Updated source code
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 8679b4ebe162 -r 4752ccf82972 main.cpp --- a/main.cpp Sat May 11 02:17:58 2019 +0000 +++ b/main.cpp Sat May 11 02:51:59 2019 +0000 @@ -4,34 +4,14 @@ LCD_DISCO_F429ZI lcd; -DigitalOut led1(LED1); -DigitalOut led2(LED2); -Thread thread_led; -Thread thread_lcd; - -void led2_thread() { +DigitalOut led1(LED1,0); +DigitalOut led2(LED2,1); + +int main() { + lcd.DisplayStringAt(0, 20, (uint8_t *)"STUDENT", CENTER_MODE); + while (true) { - led2 = !led2; - Thread::wait(1000); + led1 = !led1; + wait_ms(500); } } - -void lcd_thread() { - while (true) { - Thread::wait(500); - lcd.DisplayStringAt(0, 35, (uint8_t *)"128228", CENTER_MODE); - Thread::wait(500); - lcd.DisplayStringAt(0, 35, (uint8_t *)"<NCUT>", CENTER_MODE); - } -} - -int main() { - lcd.DisplayStringAt(0, 20, (uint8_t *)"Andrew", CENTER_MODE); - thread_led.start(led2_thread); - thread_lcd.start(lcd_thread); - - while (true) { - led1 = !led1; - Thread::wait(500); - } -}