Clavier 16 touches et afficheur LCD
Dependencies: mbed KeypadLib TextLCD
main.cpp
- Committer:
- mohamedwajdi
- Date:
- 2019-10-15
- Revision:
- 0:77656f95a148
File content as of revision 0:77656f95a148:
#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); } } }