aliff
Dependencies: TextLCD keypad mbed
Revision 0:ee45a62491c4, committed 2018-06-04
- Comitter:
- aliffhilmie93
- Date:
- Mon Jun 04 16:02:58 2018 +0000
- Commit message:
- pty aliff
Changed in this revision
diff -r 000000000000 -r ee45a62491c4 TextLCD.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TextLCD.lib Mon Jun 04 16:02:58 2018 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/simon/code/TextLCD/#308d188a2d3a
diff -r 000000000000 -r ee45a62491c4 keypad.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/keypad.lib Mon Jun 04 16:02:58 2018 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/aliffhilmie93/code/keypad/#ced7b1445bc4
diff -r 000000000000 -r ee45a62491c4 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Jun 04 16:02:58 2018 +0000 @@ -0,0 +1,50 @@ +#include "mbed.h" +#include "keypad.h" +#include "TextLCD.h" + +TextLCD lcd(D8, D9, D4, D5, D6, D7); + + +int main() { + // c0 c1 c2 c3 r0 r1 r2 r3 + Keypad keypad( PC_3,PC_2,PC_0,PC_1,PC_5,PC_4,PB_1,PA_0 ); + + keypad.enablePullUp(); + char key; +// lcd.printf(" "); + while (1) + { + key = keypad.getKey(); + if(key != KEY_RELEASED) + { + lcd.locate (0,0); + lcd.printf("%c",key); + //wait(0.6); + } + if (key=='B') + {lcd.cls(); + lcd.locate (0,0); + lcd.printf("BMT 4033"); + } + if (key=='C') + {lcd.cls(); + lcd.locate (0,0); + lcd.printf("Embedded"); + } + if (key=='D') + {lcd.cls(); + lcd.locate (0,0); + lcd.printf("System"); + } + if (key=='E') + {lcd.cls(); + lcd.locate (0,0); + lcd.printf("Design"); + } + if (key=='F') + {lcd.cls(); + lcd.locate (0,0); + lcd.printf("Score"); + } +} +}
diff -r 000000000000 -r ee45a62491c4 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Jun 04 16:02:58 2018 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/5aab5a7997ee \ No newline at end of file