mbed3 zad 4
Dependencies: LCD_DISCO_F429ZI mbed TS_DISCO_F429ZI LEDBOARD BSP_DISCO_F429ZI KEYBOARD
Diff: main.cpp
- Revision:
- 0:a9c26b76c0c1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sat Jun 13 13:30:27 2020 +0000 @@ -0,0 +1,34 @@ +#include "mbed.h" +#include "KeyboardLed.h" + +LCD_DISCO_F429ZI lcd; + +int main() +{ + KeyboardLed Touchscreen(0); + Ledboard MyLeds(2); + while(1) + { + wait(0.05); + Touchscreen.eRead(); + wait(0.05); + switch(Touchscreen.eRead()) + { + case BUTTON_0: + MyLeds.On(3); + break; + case BUTTON_1: + MyLeds.On(2); + break; + case BUTTON_2: + MyLeds.On(1); + break; + case BUTTON_3: + MyLeds.On(0); + break; + default: + MyLeds.Off(); + break; + } + } +} \ No newline at end of file