mbed3 zad 4
Dependencies: LCD_DISCO_F429ZI mbed TS_DISCO_F429ZI LEDBOARD BSP_DISCO_F429ZI KEYBOARD
main.cpp
- Committer:
- krzysiek99
- Date:
- 2020-06-13
- Revision:
- 0:a9c26b76c0c1
File content as of revision 0:a9c26b76c0c1:
#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; } } }