AGH UST MBED part 2

Dependencies:   LCD_DISCO_F429ZI mbed BSP_DISCO_F429ZI

Committer:
matis755
Date:
Sat May 09 08:55:15 2020 +0000
Revision:
1:42a82d41947f
Parent:
0:e65dff476cf0
Child:
2:8788d711db7e
tak

Who changed what in which revision?

UserRevisionLine numberNew contents of line
matis755 0:e65dff476cf0 1 #include "mbed.h"
matis755 0:e65dff476cf0 2
matis755 0:e65dff476cf0 3 DigitalOut led_green(LED1);
matis755 0:e65dff476cf0 4 DigitalOut led_red(LED2);
matis755 0:e65dff476cf0 5
matis755 1:42a82d41947f 6 //Marcin
matis755 1:42a82d41947f 7
matis755 0:e65dff476cf0 8 DigitalIn user_button(USER_BUTTON);
matis755 0:e65dff476cf0 9
matis755 0:e65dff476cf0 10 float delay = 0.5;
matis755 0:e65dff476cf0 11
matis755 0:e65dff476cf0 12 int main()
matis755 0:e65dff476cf0 13 {
matis755 0:e65dff476cf0 14 while(1) {
matis755 0:e65dff476cf0 15
matis755 0:e65dff476cf0 16 if(user_button){
matis755 0:e65dff476cf0 17 led_red = 0;
matis755 0:e65dff476cf0 18 led_green = !led_green;
matis755 0:e65dff476cf0 19 }
matis755 0:e65dff476cf0 20 else{
matis755 0:e65dff476cf0 21 led_green = 0;
matis755 0:e65dff476cf0 22 led_red = !led_red;
matis755 0:e65dff476cf0 23 }
matis755 0:e65dff476cf0 24 wait(delay);
matis755 0:e65dff476cf0 25 }
matis755 0:e65dff476cf0 26 }