Podpunkt 2d_2 z ćwiczenia mbed_cz1

Dependencies:   LCD_DISCO_F429ZI mbed TS_DISCO_F429ZI BSP_DISCO_F429ZI

main.cpp

Committer:
depsztyczek
Date:
2020-05-18
Revision:
0:4b909a2346a4

File content as of revision 0:4b909a2346a4:

#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);
    }
}