#define bouton_0 0
#define bouton_1 1
#define bouton_2 2
#define bouton_3 3
#define bouton_4 4
#define bouton_5 5
#define bouton_6 6
#define bouton_7 7
#define bouton_8 8
#define bouton_9 9
#define bouton_volplus 10
#define bouton_func 11
#define bouton_back 12
#define bouton_pause 13
char c=0;
uint16_t NA;

void setup() {
pinMode(bouton_0, OUTPUT);
pinMode(bouton_1, OUTPUT);
pinMode(bouton_2, OUTPUT);
pinMode(bouton_3, OUTPUT);
pinMode(bouton_4, OUTPUT);
pinMode(bouton_5, OUTPUT);
pinMode(bouton_6, OUTPUT);
pinMode(bouton_7, OUTPUT);
pinMode(bouton_8, OUTPUT);
pinMode(bouton_9, OUTPUT);
pinMode(bouton_volplus, OUTPUT);
pinMode(bouton_func, OUTPUT);
pinMode(bouton_back, OUTPUT);
pinMode(bouton_pause, OUTPUT);
Serial.begin(9600);
analogReference(INTERNAL);
}

void loop() {
if (Serial.available() > 0){
c = Serial.read();
switch (c) {
//--------------bouton 0 pin RX-------------
case 'Q':
digitalWrite(bouton_0, HIGH);
break;
case 'R':
digitalWrite(bouton_0,LOW);
//--------------bouton 1 pin TX-------------
case 'W':
digitalWrite(bouton_1, HIGH);
break;
case 'X':
digitalWrite(bouton_1,LOW);
break;
//--------------bouton 2 pin 2-------------
case 'Y':
digitalWrite(bouton_2, HIGH);
break;
case 'Z':
digitalWrite(bouton_2,LOW);
break;
//--------------bouton 3 pin 3-------------
case 'a':
digitalWrite(bouton_3, HIGH);
break;
case 'b':
digitalWrite(bouton_3,LOW);
break;

// --------------bouton 4 pin 4-------------
case 'c':
digitalWrite(bouton_4, HIGH);
break;
case 'd':
digitalWrite(bouton_4,LOW);
break;

//--------------bouton 5 pin 5-------------
case 'e':
digitalWrite(bouton_5, HIGH);
break;
case 'f':
digitalWrite(bouton_5,LOW);
break;

//--------------bouton 6 pin 6-------------
case 'g':
digitalWrite(bouton_6, HIGH);
break;
case 'h':
digitalWrite(bouton_6,LOW);
break;

//--------------bouton 7 pin 7-------------
case 'i':
digitalWrite(bouton_7, HIGH);
break;
case 'j':
digitalWrite(bouton_7,LOW);
break;

//--------------bouton 8 pin 8-------------
case 'k':
digitalWrite(bouton_8, HIGH);
break;
case 'l':
digitalWrite(bouton_8,LOW);
break;

//--------------bouton 9 pin 9-------------
case 'm':
digitalWrite(bouton_9, HIGH);
break;
case 'n':
digitalWrite(bouton_9,LOW);
break;
//--------------bouton volume plus pin 10-------------
case 'A':
digitalWrite(bouton_volplus, HIGH);
break;
case 'B':
digitalWrite(bouton_volplus,LOW);
break;
//--------------bouton function pin 11-------------
case 'C':
digitalWrite(bouton_func, HIGH);
break;
case 'D':
digitalWrite(bouton_func, LOW);
break;
//--------------bouton back pin 12-------------
case 'E':
digitalWrite(bouton_back, HIGH);
break;
case 'F':
digitalWrite(bouton_back,LOW);
break;
//--------------bouton pause pin 13-------------
case 'G':
digitalWrite(bouton_pause, HIGH);
break;
case 'H':
digitalWrite(bouton_pause,LOW);
break;
default:
break;
}
}
}