Kacper Gaweda / Mbed 2 deprecated 2a

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 #include "KeyboardTs.h"
00004 #include "LedLcd.h"
00005     
00006 KeyboardTsLcd Keyboard(0);    
00007 KeyboardTs Keyboard_2(0);
00008 LedLcd Led_2(2);    
00009     
00010 int main()
00011 {
00012     
00013     
00014     while(1)
00015     {
00016          wait(0.1);
00017          switch(Keyboard.eRead()) {
00018          case BUTTON_0:
00019          Led_2.On(3);
00020          break;
00021          case BUTTON_1:
00022          Led_2.On(2);
00023          break;
00024          case BUTTON_2:
00025          Led_2.On(1);
00026          break;
00027          case BUTTON_3:
00028          Led_2.On(0);
00029          break;
00030          default:
00031          Led_2.On(4);
00032          break;
00033          
00034          }       
00035     } 
00036      
00037    
00038 }
00039