Rgb led and voting lcd with 2 options (Any help?!)

I can't vote. I want led on for 3 minutes and then the voting system for 2 minutes every time from 0 - 0 . Then the led color will change randomly. red green yellow blue colors only. Any help? I am noob

#include<LiquidCrystal.h>
LiquidCrystal lcd(13, 12, 11, 10, 9, 8);

#define S1 7
#define S2 6
#define S3 5
#define S4 4
#define S5 3
const int RED_PIN=2;
const int BLUE_PIN=1;
const int GREEN_PIN=0;

int vote1=0;
int vote2=0;
int vote3=0;
int vote4=0;
void setup()
{
pinMode(S1, INPUT);
pinMode(S2,INPUT);
pinMode(S3,INPUT);
pinMode(S4,INPUT);
pinMode(S5,INPUT);
lcd.begin(16, 2);
lcd.print(" Electronic ");
lcd.setCursor(0,1);
lcd.print(" Voting Machine ");
delay(2000);
digitalWrite(S1, HIGH);
digitalWrite(S2, HIGH);
digitalWrite(S3, HIGH);
digitalWrite(S4, HIGH);
digitalWrite(S5, HIGH);
lcd.clear();
lcd.setCursor(1,0);
lcd.print("A");
lcd.setCursor(5,0);
lcd.print("B");

pinMode(RED_PIN, OUTPUT);
pinMode(BLUE_PIN, OUTPUT);
pinMode(GREEN_PIN, OUTPUT);

}
void loop()
{
digitalWrite(RED_PIN, HIGH);
digitalWrite(BLUE_PIN, LOW);
digitalWrite(GREEN_PIN, LOW);
delay(180000); // Wait for 1000 millisecond(s)

digitalWrite(RED_PIN, LOW);
digitalWrite(BLUE_PIN, LOW);
digitalWrite(GREEN_PIN, LOW);
delay(120000);

lcd.setCursor(1,0);
lcd.print("A");
lcd.setCursor(1,1);
lcd.print(vote1);
lcd.setCursor(5,0);
lcd.print("B");
lcd.setCursor(5,1);
lcd.print(vote2);
lcd.setCursor(9,0);

if(digitalRead(S1)==0)
vote1++;
while(digitalRead(S1)==0);
if(digitalRead(S2)==0)
vote2++;
while(digitalRead(S2)==0);

if(digitalRead(S5)==0)
{
int vote=vote1+vote2;
if(vote)
{
if(vote1 > vote2 )
{
lcd.clear();
lcd.print("A is Winner");
delay(3000);
lcd.clear();
}
else if(vote2 > vote1 )
{
lcd.clear();
lcd.print("B is Winner");
delay(3000);
lcd.clear();
}

else
{
lcd.clear();
lcd.print(" Tie Up Or ");
lcd.setCursor(0,1);
lcd.print(" No Result ");
delay(3000);
lcd.clear();
}

}
else
{
lcd.clear();
lcd.print("No Voting....");
delay(3000);
lcd.clear();
}
vote1=0;vote2=0;vote3=0;vote4=0,vote=0;
lcd.clear();
}

digitalWrite(RED_PIN, LOW);
digitalWrite(BLUE_PIN, LOW);
digitalWrite(GREEN_PIN, HIGH);
delay(180000);

digitalWrite(RED_PIN, LOW);
digitalWrite(BLUE_PIN, LOW);
digitalWrite(GREEN_PIN, LOW);
delay(120000);

lcd.setCursor(1,0);
lcd.print("A");
lcd.setCursor(1,1);
lcd.print(vote1);
lcd.setCursor(5,0);
lcd.print("B");
lcd.setCursor(5,1);
lcd.print(vote2);
lcd.setCursor(9,0);

if(digitalRead(S1)==0)
vote1++;
while(digitalRead(S1)==0);
if(digitalRead(S2)==0)
vote2++;
while(digitalRead(S2)==0);

if(digitalRead(S5)==0)
{
int vote=vote1+vote2;
if(vote)
{
if(vote1 > vote2 )
{
lcd.clear();
lcd.print("A is Winner");
delay(1000);
lcd.clear();
}
else if(vote2 > vote1 )
{
lcd.clear();
lcd.print("B is Winner");
delay(1000);
lcd.clear();
}

else
{
lcd.clear();
lcd.print(" Tie Up Or ");
lcd.setCursor(0,1);
lcd.print(" No Result ");
delay(3000);
lcd.clear();
}

}
else
{
lcd.clear();
lcd.print("No Voting....");
delay(3000);
lcd.clear();
}
vote1=0;vote2=0;vote3=0;vote4=0,vote=0;
lcd.clear();
}
digitalWrite(RED_PIN, HIGH);
digitalWrite(BLUE_PIN, LOW);
digitalWrite(GREEN_PIN, HIGH);
delay(1000);

digitalWrite(RED_PIN, LOW);
digitalWrite(BLUE_PIN, LOW);
digitalWrite(GREEN_PIN, LOW);
delay(1000);

lcd.setCursor(1,0);
lcd.print("A");
lcd.setCursor(1,1);
lcd.print(vote1);
lcd.setCursor(5,0);
lcd.print("B");
lcd.setCursor(5,1);
lcd.print(vote2);
lcd.setCursor(9,0);

if(digitalRead(S1)==0)
vote1++;
while(digitalRead(S1)==0);
if(digitalRead(S2)==0)
vote2++;
while(digitalRead(S2)==0);

if(digitalRead(S5)==0)
{
int vote=vote1+vote2;
if(vote)
{
if(vote1 > vote2 )
{
lcd.clear();
lcd.print("A is Winner");
delay(3000);
lcd.clear();
}
else if(vote2 > vote1 )
{
lcd.clear();
lcd.print("B is Winner");
delay(3000);
lcd.clear();
}

else
{
lcd.clear();
lcd.print(" Tie Up Or ");
lcd.setCursor(0,1);
lcd.print(" No Result ");
delay(3000);
lcd.clear();
}

}
else
{
lcd.clear();
lcd.print("No Voting....");
delay(3000);
lcd.clear();
}
vote1=0;vote2=0;vote3=0;vote4=0,vote=0;
lcd.clear();
}

digitalWrite(RED_PIN, LOW);
digitalWrite(BLUE_PIN, HIGH);
digitalWrite(GREEN_PIN, LOW);
delay(180000);

digitalWrite(RED_PIN, LOW);
digitalWrite(BLUE_PIN, LOW);
digitalWrite(GREEN_PIN, LOW);
delay(120000);

lcd.setCursor(1,0);
lcd.print("A");
lcd.setCursor(1,1);
lcd.print(vote1);
lcd.setCursor(5,0);
lcd.print("B");
lcd.setCursor(5,1);
lcd.print(vote2);
lcd.setCursor(9,0);

if(digitalRead(S1)==0)
vote1++;
while(digitalRead(S1)==0);
if(digitalRead(S2)==0)
vote2++;
while(digitalRead(S2)==0);

if(digitalRead(S5)==0)
{
int vote=vote1+vote2;
if(vote)
{
if(vote1 > vote2 )
{
lcd.clear();
lcd.print("A is Winner");
delay(3000);
lcd.clear();
}
else if(vote2 > vote1 )
{
lcd.clear();
lcd.print("B is Winner");
delay(3000);
lcd.clear();
}

else
{
lcd.clear();
lcd.print(" Tie Up Or ");
lcd.setCursor(0,1);
lcd.print(" No Result ");
delay(3000);
lcd.clear();
}

}
else
{
lcd.clear();
lcd.print("No Voting....");
delay(3000);
lcd.clear();
}
vote1=0;vote2=0;vote3=0;vote4=0,vote=0;
lcd.clear();
}

digitalWrite(RED_PIN, HIGH);
digitalWrite(BLUE_PIN, LOW);
digitalWrite(GREEN_PIN, HIGH);
delay(1000);

digitalWrite(RED_PIN, LOW);
digitalWrite(BLUE_PIN, LOW);
digitalWrite(GREEN_PIN, LOW);
delay(1000);

lcd.setCursor(1,0);
lcd.print("A");
lcd.setCursor(1,1);
lcd.print(vote1);
lcd.setCursor(5,0);
lcd.print("B");
lcd.setCursor(5,1);
lcd.print(vote2);
lcd.setCursor(9,0);

if(digitalRead(S1)==0)
vote1++;
while(digitalRead(S1)==0);
if(digitalRead(S2)==0)
vote2++;
while(digitalRead(S2)==0);

if(digitalRead(S5)==0)
{
int vote=vote1+vote2;
if(vote)
{
if(vote1 > vote2 )
{
lcd.clear();
lcd.print("A is Winner");
delay(3000);
lcd.clear();
}
else if(vote2 > vote1 )
{
lcd.clear();
lcd.print("B is Winner");
delay(3000);
lcd.clear();
}

else
{
lcd.clear();
lcd.print(" Tie Up Or ");
lcd.setCursor(0,1);
lcd.print(" No Result ");
delay(3000);
lcd.clear();
}

}
else
{
lcd.clear();
lcd.print("No Voting....");
delay(3000);
lcd.clear();
}
vote1=0;vote2=0;vote3=0;vote4=0,vote=0;
lcd.clear();
}

digitalWrite(RED_PIN, HIGH);
digitalWrite(BLUE_PIN, LOW);
digitalWrite(GREEN_PIN, LOW);
delay(1000);

digitalWrite(RED_PIN, LOW);
digitalWrite(BLUE_PIN, LOW);
digitalWrite(GREEN_PIN, LOW);
delay(1000);

lcd.setCursor(1,0);
lcd.print("A");
lcd.setCursor(1,1);
lcd.print(vote1);
lcd.setCursor(5,0);
lcd.print("B");
lcd.setCursor(5,1);
lcd.print(vote2);
lcd.setCursor(9,0);

if(digitalRead(S1)==0)
vote1++;
while(digitalRead(S1)==0);
if(digitalRead(S2)==0)
vote2++;
while(digitalRead(S2)==0);

if(digitalRead(S5)==0)
{
int vote=vote1+vote2;
if(vote)
{
if(vote1 > vote2 )
{
lcd.clear();
lcd.print("A is Winner");
delay(3000);
lcd.clear();
}
else if(vote2 > vote1 )
{
lcd.clear();
lcd.print("B is Winner");
delay(3000);
lcd.clear();
}

else
{
lcd.clear();
lcd.print(" Tie Up Or ");
lcd.setCursor(0,1);
lcd.print(" No Result ");
delay(3000);
lcd.clear();
}

}
else
{
lcd.clear();
lcd.print("No Voting....");
delay(3000);
lcd.clear();
}
vote1=0;vote2=0;vote3=0;vote4=0,vote=0;
lcd.clear();
}

digitalWrite(RED_PIN, LOW);
digitalWrite(BLUE_PIN, HIGH);
digitalWrite(GREEN_PIN, LOW);
delay(1000);

digitalWrite(RED_PIN, LOW);
digitalWrite(BLUE_PIN, LOW);
digitalWrite(GREEN_PIN, LOW);
delay(1000);

lcd.setCursor(1,0);
lcd.print("A");
lcd.setCursor(1,1);
lcd.print(vote1);
lcd.setCursor(5,0);
lcd.print("B");
lcd.setCursor(5,1);
lcd.print(vote2);
lcd.setCursor(9,0);

if(digitalRead(S1)==0)
vote1++;
while(digitalRead(S1)==0);
if(digitalRead(S2)==0)
vote2++;
while(digitalRead(S2)==0);

if(digitalRead(S5)==0)
{
int vote=vote1+vote2;
if(vote)
{
if(vote1 > vote2 )
{
lcd.clear();
lcd.print("A is Winner");
delay(3000);
lcd.clear();
}
else if(vote2 > vote1 )
{
lcd.clear();
lcd.print("B is Winner");
delay(3000);
lcd.clear();
}

else
{
lcd.clear();
lcd.print(" Tie Up Or ");
lcd.setCursor(0,1);
lcd.print(" No Result ");
delay(3000);
lcd.clear();
}

}
else
{
lcd.clear();
lcd.print("No Voting....");
delay(3000);
lcd.clear();
}
vote1=0;vote2=0;vote3=0;vote4=0,vote=0;
lcd.clear();
}
digitalWrite(RED_PIN, LOW);
digitalWrite(BLUE_PIN, LOW);
digitalWrite(GREEN_PIN, HIGH);
delay(180000);

digitalWrite(RED_PIN, LOW);
digitalWrite(BLUE_PIN, LOW);
digitalWrite(GREEN_PIN, LOW);
delay(120000);

lcd.setCursor(1,0);
lcd.print("A");
lcd.setCursor(1,1);
lcd.print(vote1);
lcd.setCursor(5,0);
lcd.print("B");
lcd.setCursor(5,1);
lcd.print(vote2);
lcd.setCursor(9,0);

if(digitalRead(S1)==0)
vote1++;
while(digitalRead(S1)==0);
if(digitalRead(S2)==0)
vote2++;
while(digitalRead(S2)==0);

if(digitalRead(S5)==0)
{
int vote=vote1+vote2;
if(vote)
{
if(vote1 > vote2 )
{
lcd.clear();
lcd.print("A is Winner");
delay(3000);
lcd.clear();
}
else if(vote2 > vote1 )
{
lcd.clear();
lcd.print("B is Winner");
delay(3000);
lcd.clear();
}

else
{
lcd.clear();
lcd.print(" Tie Up Or ");
lcd.setCursor(0,1);
lcd.print(" No Result ");
delay(3000);
lcd.clear();
}

}
else
{
lcd.clear();
lcd.print("No Voting....");
delay(3000);
lcd.clear();
}
vote1=0;vote2=0;vote3=0;vote4=0,vote=0;
lcd.clear();
}

digitalWrite(RED_PIN, HIGH);
digitalWrite(BLUE_PIN, LOW);
digitalWrite(GREEN_PIN, LOW);
delay(180000); // Wait for 1000 millisecond(s)

digitalWrite(RED_PIN, LOW);
digitalWrite(BLUE_PIN, LOW);
digitalWrite(GREEN_PIN, LOW);
delay(120000);

lcd.setCursor(1,0);
lcd.print("A");
lcd.setCursor(1,1);
lcd.print(vote1);
lcd.setCursor(5,0);
lcd.print("B");
lcd.setCursor(5,1);
lcd.print(vote2);
lcd.setCursor(9,0);

if(digitalRead(S1)==0)
vote1++;
while(digitalRead(S1)==0);
if(digitalRead(S2)==0)
vote2++;
while(digitalRead(S2)==0);

if(digitalRead(S5)==0)
{
int vote=vote1+vote2;
if(vote)
{
if(vote1 > vote2 )
{
lcd.clear();
lcd.print("A is Winner");
delay(3000);
lcd.clear();
}
else if(vote2 > vote1 )
{
lcd.clear();
lcd.print("B is Winner");
delay(3000);
lcd.clear();
}

else
{
lcd.clear();
lcd.print(" Tie Up Or ");
lcd.setCursor(0,1);
lcd.print(" No Result ");
delay(3000);
lcd.clear();
}

}
else
{
lcd.clear();
lcd.print("No Voting....");
delay(3000);
lcd.clear();
}
vote1=0;vote2=0;vote3=0;vote4=0,vote=0;
lcd.clear();
}

digitalWrite(RED_PIN, HIGH);
digitalWrite(BLUE_PIN, LOW);
digitalWrite(GREEN_PIN, HIGH);
delay(180000);

digitalWrite(RED_PIN, LOW);
digitalWrite(BLUE_PIN, LOW);
digitalWrite(GREEN_PIN, LOW);
delay(120000);

lcd.setCursor(1,0);
lcd.print("A");
lcd.setCursor(1,1);
lcd.print(vote1);
lcd.setCursor(5,0);
lcd.print("B");
lcd.setCursor(5,1);
lcd.print(vote2);
lcd.setCursor(9,0);

if(digitalRead(S1)==0)
vote1++;
while(digitalRead(S1)==0);
if(digitalRead(S2)==0)
vote2++;
while(digitalRead(S2)==0);

if(digitalRead(S5)==0)
{
int vote=vote1+vote2;
if(vote)
{
if(vote1 > vote2 )
{
lcd.clear();
lcd.print("A is Winner");
delay(3000);
lcd.clear();
}
else if(vote2 > vote1 )
{
lcd.clear();
lcd.print("B is Winner");
delay(3000);
lcd.clear();
}

else
{
lcd.clear();
lcd.print(" Tie Up Or ");
lcd.setCursor(0,1);
lcd.print(" No Result ");
delay(3000);
lcd.clear();
}

}
else
{
lcd.clear();
lcd.print("No Voting....");
delay(3000);
lcd.clear();
}
vote1=0;vote2=0;vote3=0;vote4=0,vote=0;
lcd.clear();
}

digitalWrite(RED_PIN, HIGH);
digitalWrite(BLUE_PIN, LOW);
digitalWrite(GREEN_PIN, LOW);
delay(180000); // Wait for 1000 millisecond(s)

digitalWrite(RED_PIN, LOW);
digitalWrite(BLUE_PIN, LOW);
digitalWrite(GREEN_PIN, LOW);
delay(120000);

lcd.setCursor(1,0);
lcd.print("A");
lcd.setCursor(1,1);
lcd.print(vote1);
lcd.setCursor(5,0);
lcd.print("B");
lcd.setCursor(5,1);
lcd.print(vote2);
lcd.setCursor(9,0);

if(digitalRead(S1)==0)
vote1++;
while(digitalRead(S1)==0);
if(digitalRead(S2)==0)
vote2++;
while(digitalRead(S2)==0);

if(digitalRead(S5)==0)
{
int vote=vote1+vote2;
if(vote)
{
if(vote1 > vote2 )
{
lcd.clear();
lcd.print("A is Winner");
delay(3000);
lcd.clear();
}
else if(vote2 > vote1 )
{
lcd.clear();
lcd.print("B is Winner");
delay(3000);
lcd.clear();
}

else
{
lcd.clear();
lcd.print(" Tie Up Or ");
lcd.setCursor(0,1);
lcd.print(" No Result ");
delay(3000);
lcd.clear();
}

}
else
{
lcd.clear();
lcd.print("No Voting....");
delay(3000);
lcd.clear();
}
vote1=0;vote2=0;vote3=0;vote4=0,vote=0;
lcd.clear();
}
}
void mainColors()
{
// Off (all LEDs off):

digitalWrite(RED_PIN, LOW);
digitalWrite(GREEN_PIN, LOW);
digitalWrite(BLUE_PIN, LOW);

delay(180000);

// Red (turn just the red LED on):

digitalWrite(RED_PIN, HIGH);
digitalWrite(GREEN_PIN, LOW);
digitalWrite(BLUE_PIN, LOW);

delay(180000);

// Green (turn just the green LED on):

digitalWrite(RED_PIN, LOW);
digitalWrite(GREEN_PIN, HIGH);
digitalWrite(BLUE_PIN, LOW);

delay(180000);

// Blue (turn just the blue LED on):

digitalWrite(RED_PIN, LOW);
digitalWrite(GREEN_PIN, LOW);
digitalWrite(BLUE_PIN, HIGH);

delay(180000);
// Yellow (turn red and green on):

digitalWrite(RED_PIN, HIGH);
digitalWrite(GREEN_PIN, HIGH);
digitalWrite(BLUE_PIN, LOW);

delay(180000);

}

I think you've broken my scrolling thumb.

Please remember to use code tags when posting code

const int BLUE_PIN=1;
const int GREEN_PIN=0;

Why would you make debugging so difficult for yourself? :open_mouth:

I can't figure out what the code is meant to do from the comments.

spaghetti code !

delay(180000);