int role_1 = 10;
int role_2 = 9;
int role_3 = 8;
int role_4 = 7;
int buton_1 = A1;
int buton_2 = A2;
int buton_3 = A3;
int buton_4 = A4;
int cikis_1 = 2;
int cikis_2 = 3;
int cikis_3 = 4;
int cikis_4 = 5;
int b1d;
int b2d;
int b3d;
int b4d;
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);
pinMode(cikis_1, OUTPUT);
pinMode(cikis_2, OUTPUT);
pinMode(cikis_3, OUTPUT);
pinMode(cikis_4, OUTPUT);
}
void loop()
{
{
b1d = digitalRead(buton_1);
b2d = digitalRead(buton_2);
b3d = digitalRead(buton_3);
b4d = digitalRead(buton_4);
if (b1d == HIGH)
{
digitalWrite(role_1, HIGH);
digitalWrite(role_2, LOW);
digitalWrite(role_3, LOW);
digitalWrite(role_4, LOW);
digitalWrite(cikis_2, LOW);
digitalWrite(cikis_3, LOW);
digitalWrite(cikis_4, LOW);
}
else if (b2d == HIGH)
{
digitalWrite(role_2, HIGH);
digitalWrite(role_1, LOW);
digitalWrite(role_3, LOW);
digitalWrite(role_4, LOW);
digitalWrite(cikis_1, LOW);
digitalWrite(cikis_3, LOW);
digitalWrite(cikis_4, LOW);
}
else if (b3d == HIGH)
{
digitalWrite(role_3, HIGH);
digitalWrite(role_1, LOW);
digitalWrite(role_2, LOW);
digitalWrite(role_4, LOW);
digitalWrite(cikis_1, LOW);
digitalWrite(cikis_2, LOW);
digitalWrite(cikis_4, LOW);
}
else if (b4d == HIGH)
{
digitalWrite(role_4, HIGH);
digitalWrite(role_1, LOW);
digitalWrite(role_2, LOW);
digitalWrite(role_3, LOW);
digitalWrite(cikis_1, LOW);
digitalWrite(cikis_2, LOW);
digitalWrite(cikis_3, LOW);
}
else
{
digitalWrite(role_1, LOW);
digitalWrite(role_2, LOW);
digitalWrite(role_3, LOW);
digitalWrite(role_4, LOW);
digitalWrite(cikis_1, HIGH);
digitalWrite(cikis_2, HIGH);
digitalWrite(cikis_3, HIGH);
digitalWrite(cikis_4, HIGH);
}
}
}