Roza Dwornik / Mbed 2 deprecated DISCO-F429ZI_mbed1

Dependencies:   LCD_DISCO_F429ZI mbed TS_DISCO_F429ZI BSP_DISCO_F429ZI

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "KeyboardTsLcd.h"
00003 
00004 int main()
00005 {
00006     KeyboardTsLcd Keyboard(0);
00007     LedLcd Led(2);
00008     
00009     while(1) {
00010         switch(Keyboard.eRead()) {
00011             case BUTTON_0:
00012                 Led.On(3);
00013                 break;
00014             case BUTTON_1:
00015                 Led.On(2);
00016                 break;
00017             case BUTTON_2:
00018                 Led.On(1);
00019                 break;
00020             case BUTTON_3:
00021                 Led.On(0);
00022                 break;
00023             default :
00024                 Led.On(4);
00025                 break;
00026             }
00027         wait(0.1);
00028     }
00029 }