int role_1 = 12;
int role_2 = 11;
int role_3 = 10;
int role_4 = 9;
int buton_1 = A1;
int buton_2 = A2;
int buton_3 = A3;
int buton_4 = A4;
void setup()
{
pinMode(role_1, OUTPUT);
pinMode(role_2, OUTPUT);
pinMode(role_3, OUTPUT);
pinMode(role_4, OUTPUT);
pinMode(buton_1, INPUT);
pinMode(buton_2, INPUT);
pinMode(buton_3, INPUT);
pinMode(buton_4, INPUT);
}
void loop()
{
if(digitalRead(buton_1) == HIGH && digitalRead(buton_2) == LOW && digitalRead(buton_3) == LOW && digitalRead(buton_4) == LOW) {digitalWrite(role_1, HIGH);}
else
{digitalWrite(role_1, LOW);}
if(digitalRead(buton_1) == LOW && digitalRead(buton_2) == HIGH && digitalRead(buton_3) == LOW && digitalRead(buton_4) == LOW) {digitalWrite(role_2, HIGH);}
else
{digitalWrite(role_2, LOW);}
if(digitalRead(buton_1) == LOW && digitalRead(buton_2) == LOW && digitalRead(buton_3) == HIGH && digitalRead(buton_4) == LOW) {digitalWrite(role_3, HIGH);}
else
{digitalWrite(role_3, LOW);}
if(digitalRead(buton_1) == LOW && digitalRead(buton_2) == LOW && digitalRead(buton_3) == LOW && digitalRead(buton_4) == HIGH) {digitalWrite(role_4, HIGH);}
else
{digitalWrite(role_4, LOW);}
}