Étape 4: Code ;
#include < liquidCrystal.h >
#include < Keypad.h >
#include < Wire.h >
const lignes octet = 4 ;
const cols octets = 3 ;
touches de char [lignes] [colonnes] = {}
{'1', « 2 », 3'},
{'4', « 5 », 6'},
{« 7 », « 8 », 9'},
{'*','0','#'}
};
rowPins Byte [rangs] = {13,10,9,8} ;
colPins Byte [CDL] = {7,6,1} ;
Clavier keypad=Keypad(makeKeymap(keys),rowPins,colPins,rows,cols) ;
Innovente Lcd(12,11,5,4,3,2) ;
void setup() {}
LCD.Begin(16,2) ;
Lcd.setCursor(1,0) ;
LCD.Print ("Press un nombre") ;
Mettez votre code de programme d’installation ici, pour exécuter une fois :
}
void loop() {}
char key=keypad.getKey() ;
if(int(Key)!=0)
{
Lcd.setCursor(5,1) ;
LCD.Print(Key) ;
}
}