
Podpunkt 2d_2 z ćwiczenia mbed_cz1
Dependencies: LCD_DISCO_F429ZI mbed TS_DISCO_F429ZI BSP_DISCO_F429ZI
Diff: main.cpp
- Revision:
- 0:4b909a2346a4
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon May 18 11:50:27 2020 +0000 @@ -0,0 +1,32 @@ +#include "mbed.h" +#include "Keyboard_Ts.h" +#include "Led_Lcd.h" +#include "KeyboardTsLcd.h" + +int main(){ + + KeyboardTsLcd KeyboardLead(0); + KeyboardTsLcd KeyboardFollow(2); + + while(1) { + + switch( KeyboardLead.eRead() ) { + case BUTTON_0: + KeyboardFollow.pLed->On(3); + break; + case BUTTON_1: + KeyboardFollow.pLed->On(2); + break; + case BUTTON_2: + KeyboardFollow.pLed->On(1); + break; + case BUTTON_3: + KeyboardFollow.pLed->On(0); + break; + default: + KeyboardFollow.pLed->On(4); + break; + } + wait(0.1); + } +}