1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
boolean etatBout1 = false;// b
boolean etatBout2 = false;//b
boolean etatBout3 = false;//b
boolean etatBout4 = false;//b
boolean etatBout5 = false;
etatBout1 = digitalRead(boutB);// boutton Bas
etatBout2 = digitalRead(boutD);//bouton de valeur
etatBout3 = digitalRead(boutH);//bouton haut
etatBout4 = digitalRead(boutG);//bouton valeur
etatBout5 = digitalRead(boutM);
if (etatBout1 || etatBout2 || etatBout3 || etatBout4|| etatBout5) {
if (etatBout1) {
CodeCommande = 1;
EnvoiCommande(CodeCommande);
}
if (etatBout2) {
CodeCommande = 2;
EnvoiCommande(CodeCommande);
}
if (etatBout3) {
CodeCommande = 3;
EnvoiCommande(CodeCommande);
}
if (etatBout4) {
CodeCommande = 4;
EnvoiCommande(CodeCommande);
}
if (etatBout5) {
CodeCommande = 5;// ya que celle la qui est renvoyer avec envoiCommande
EnvoiCommande(CodeCommande);
}
} |
Partager