AGH UST MBED part 2
Dependencies: LCD_DISCO_F429ZI mbed BSP_DISCO_F429ZI
Diff: main.cpp
- Revision:
- 0:e65dff476cf0
- Child:
- 1:42a82d41947f
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sat May 09 08:53:44 2020 +0000 @@ -0,0 +1,24 @@ +#include "mbed.h" + +DigitalOut led_green(LED1); +DigitalOut led_red(LED2); + +DigitalIn user_button(USER_BUTTON); + +float delay = 0.5; + +int main() +{ + while(1) { + + if(user_button){ + led_red = 0; + led_green = !led_green; + } + else{ + led_green = 0; + led_red = !led_red; + } + wait(delay); + } +}