Clavier 16 touches et afficheur LCD
Dependencies: mbed KeypadLib TextLCD
Revision 0:77656f95a148, committed 2019-10-15
- Comitter:
- mohamedwajdi
- Date:
- Tue Oct 15 22:18:41 2019 +0000
- Commit message:
- TP2 uC et interfaces 2GII
Changed in this revision
diff -r 000000000000 -r 77656f95a148 KeypadLib.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/KeypadLib.lib Tue Oct 15 22:18:41 2019 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/rlanghbv/code/KeypadLib/#1f7793af2f64
diff -r 000000000000 -r 77656f95a148 TextLCD.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TextLCD.lib Tue Oct 15 22:18:41 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/simon/code/TextLCD/#308d188a2d3a
diff -r 000000000000 -r 77656f95a148 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Oct 15 22:18:41 2019 +0000 @@ -0,0 +1,27 @@ +#include "mbed.h" +#include "keypad.h" +#include "TextLCD.h" + +int main() { +DigitalOut led(PC_13); + // C1 C2 C3 C4 L1 L2 L3 L4 + Keypad clavier( PA_3,PA_2,PA_1,PA_0,PA_7,PA_6,PA_5,PA_4 ); + + // RS E D4 D5 D6 D7 + TextLCD lcd(PA_9, PA_8, PB_15, PB_14, PB_13, PB_12,TextLCD::LCD16x2); + + clavier.enablePullUp(); + char key; + lcd.cls(); + lcd.printf("TP2 2GII ENETCOM"); + while (1) { + key = clavier.getKey(); + if(key != 0) { + lcd.cls(); + lcd.printf("%c",key); + led = !led; + wait(0.2); + } + } +} +
diff -r 000000000000 -r 77656f95a148 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Oct 15 22:18:41 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file