AGH UST mbed part 3
Dependencies: LCD_DISCO_F429ZI mbed TS_DISCO_F429ZI BSP_DISCO_F429ZI
main.cpp@4:459a0389bb9f, 2020-06-16 (annotated)
- Committer:
- matis755
- Date:
- Tue Jun 16 09:35:53 2020 +0000
- Revision:
- 4:459a0389bb9f
- Parent:
- 2:db40a2b0b177
dd
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
matis755 | 2:db40a2b0b177 | 1 | #include "KeyboardLed.h" |
matis755 | 2:db40a2b0b177 | 2 | #include "LCD_DISCO_F429ZI.h" |
matis755 | 2:db40a2b0b177 | 3 | |
matis755 | 2:db40a2b0b177 | 4 | LCD_DISCO_F429ZI Lcd; |
matis755 | 0:f4a48c08fea7 | 5 | |
matis755 | 0:f4a48c08fea7 | 6 | int main() { |
matis755 | 4:459a0389bb9f | 7 | Lcd.Clear(LCD_COLOR_BLACK); |
matis755 | 4:459a0389bb9f | 8 | Lcd.SetFont(&Font24); |
matis755 | 4:459a0389bb9f | 9 | |
matis755 | 2:db40a2b0b177 | 10 | KeyboardLed Keyboard(0); |
matis755 | 2:db40a2b0b177 | 11 | Ledboard Led(2); |
matis755 | 0:f4a48c08fea7 | 12 | |
matis755 | 0:f4a48c08fea7 | 13 | while(1) { |
matis755 | 1:36b3fd4a01fd | 14 | switch(Keyboard.eRead()) { |
matis755 | 1:36b3fd4a01fd | 15 | case BUTTON_0: |
matis755 | 1:36b3fd4a01fd | 16 | Led.On(3); |
matis755 | 1:36b3fd4a01fd | 17 | break; |
matis755 | 1:36b3fd4a01fd | 18 | case BUTTON_1: |
matis755 | 1:36b3fd4a01fd | 19 | Led.On(2); |
matis755 | 1:36b3fd4a01fd | 20 | break; |
matis755 | 1:36b3fd4a01fd | 21 | case BUTTON_2: |
matis755 | 1:36b3fd4a01fd | 22 | Led.On(1); |
matis755 | 1:36b3fd4a01fd | 23 | break; |
matis755 | 1:36b3fd4a01fd | 24 | case BUTTON_3: |
matis755 | 1:36b3fd4a01fd | 25 | Led.On(0); |
matis755 | 1:36b3fd4a01fd | 26 | break; |
matis755 | 1:36b3fd4a01fd | 27 | default : |
matis755 | 2:db40a2b0b177 | 28 | Led.Off(); |
matis755 | 1:36b3fd4a01fd | 29 | break; |
matis755 | 1:36b3fd4a01fd | 30 | } |
matis755 | 0:f4a48c08fea7 | 31 | wait(0.1); |
matis755 | 0:f4a48c08fea7 | 32 | } |
matis755 | 0:f4a48c08fea7 | 33 | } |