mbed1 - final ex.2d-2

Dependencies:   LCD_DISCO_F429ZI mbed BSP_DISCO_F429ZI

main.cpp

Committer:
domino5740
Date:
2020-05-09
Revision:
1:6d73aee900b3
Parent:
0:88ab6a9221e8

File content as of revision 1:6d73aee900b3:

#include "mbed.h"
#include "KeyboardTsLcd.h"
int main()
{
    KeyboardTsLcd Keyboard(1);
    Led_Lcd Led(3);
    while(1) {
        switch(Keyboard.eRead()) {
            case BUTTON_0:
                Led.On(3);
                break;
            case BUTTON_1:
                Led.On(2);
                break;
            case BUTTON_2:
                Led.On(1);
                break;
            case BUTTON_3:
                Led.On(0);
                break;
            default:
                Led.On(4);
                break;
        }
        wait(0.1);
    }
}