AGH UST MBED part 2
Dependencies: LCD_DISCO_F429ZI mbed BSP_DISCO_F429ZI
main.cpp
- Committer:
- matis755
- Date:
- 2020-05-09
- Revision:
- 0:e65dff476cf0
- Child:
- 1:42a82d41947f
File content as of revision 0:e65dff476cf0:
#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); } }