utiliser switch/case pour agir avec plusieur bouton

Bonjour
je voudrai utilise plusieur bouton poussoir pour faire varier des sorties analogique sur un mega 2560 utilise les entres digital j ai comprit le fonctionnement avec des touches tapes sur un clavier mais la je n arrive pa a faire la meme chose avec des entrees qui passeront a 1
bouton 1 raz
bouton 2 avance
bouton 3 recule
bouton 4 droite
bouton 5 gauche
aucun bouton active stop
merci d avance j ai colle programme qui fonctionne avec les touches de clavier


int message = 0;

void setup()
{
Serial.begin(9600);
}
void loop()
{
if (Serial.available()) {
message = Serial.read()-'0'; // on soustrait le caractère 0, qui vaut 48 en ASCII

switch (message) {

case '7':
Serial.println("raz");
// raz
analogWrite(2, 0);
analogWrite(4, 0);
analogWrite(6, 0);
analogWrite(5, 0);
analogWrite(7, 0);
break;

case '8':
Serial.println("avancer impulsion");
// on AVANCE
analogWrite(2, 130);
analogWrite(4, 24);
analogWrite(6, 130);
analogWrite(5, 235);
analogWrite(7, 130);
delay(2000);
analogWrite(2, 130);
analogWrite(4, 130);
analogWrite(6, 130);
analogWrite(5, 130);
analogWrite(7, 130);
break;

case '2':
Serial.println("reculer impulsion");
// on recule
analogWrite(2, 130);
analogWrite(4, 235);
analogWrite(6, 130);
analogWrite(5, 24);
analogWrite(7, 130);
delay(2000);
analogWrite(2, 130);
analogWrite(4, 130);
analogWrite(6, 130);
analogWrite(5, 130);
analogWrite(7, 130);
break;

case '6':
Serial.println("droite impulsion");
// on va a droite
analogWrite(2, 24);
analogWrite(4, 130);
analogWrite(6, 130);
analogWrite(5, 130);
analogWrite(7, 235);
delay(2000);
analogWrite(2, 130);
analogWrite(4, 130);
analogWrite(6, 130);
analogWrite(5, 130);
analogWrite(7, 130);
break;

case '4':
Serial.println("gauche implusion");
// on va a gauche
analogWrite(2, 220);
analogWrite(4, 130);
analogWrite(6, 130);
analogWrite(5, 130);
analogWrite(7, 24);
delay(2000);
analogWrite(2, 130);
analogWrite(4, 130);
analogWrite(6, 130);
analogWrite(5, 130);
analogWrite(7, 130);
break;

case '9':
Serial.println("avancer");
// on AVANCE
analogWrite(2, 130);
analogWrite(4, 24);
analogWrite(6, 130);
analogWrite(5, 235);
analogWrite(7, 130);
break;

case '3':
Serial.println("reculer");
// on recule
analogWrite(2, 130);
analogWrite(4, 235);
analogWrite(6, 130);
analogWrite(5, 24);
analogWrite(7, 130);
break;

case '5':
Serial.println("stop");
// on arrete
analogWrite(2, 130);
analogWrite(4, 130);
analogWrite(6, 130);
analogWrite(5, 130);
analogWrite(7, 130);
break;

default:
Serial.print("commande ");
Serial.print(message);
Serial.println(" non reconnue.");
break;
}
}
}