Here it is. I know it could do with arrays instead.
// SETS PUSHBUTTON SWITCHES
const int pushbutton1 = 2;
const int pushbutton2 = 3;
const int pushbutton3 = 4;
const int pushbutton4 = 5;
const int pushbutton5 = 6;
const int pushbutton6 = 7;
// SETS RELAY PINS
const int relayCT = 10;
const int relayL1 = 11;
const int relayL2 = 12;
const int relayL3 = 13;
const int relayL4 = 14;
const int relayCB = 15;
const int relayR1 = 16;
const int relayR2 = 17;
const int relayR3 = 18;
const int relayR4 = 19;
// CURRENT STATE OF PUSHBUTTONS
int pushbuttonState1 = 0;
int pushbuttonState2 = 0;
int pushbuttonState3 = 0;
int pushbuttonState4 = 0;
int pushbuttonState5 = 0;
int pushbuttonState6 = 0;
// CURRENT STATE OF RELAYS
int relayStateCT = 0;
int relayStateL1 = 0;
int relayStateL2 = 0;
int relayStateL3 = 0;
int relayStateL4 = 0;
int relayStateCB = 0;
int relayStateR1 = 0;
int relayStateR2 = 0;
int relayStateR3= 0;
int relayStateR4 = 0;
void setup() {
// pushbuttons as inputs
pinMode(pushbutton1, INPUT);
pinMode(pushbutton2, INPUT);
pinMode(pushbutton3, INPUT);
pinMode(pushbutton4, INPUT);
pinMode(pushbutton5, INPUT);
pinMode(pushbutton6, INPUT);
// relays as outputs
pinMode(relayCT, OUTPUT);
pinMode(relayL1, OUTPUT);
pinMode(relayL2, OUTPUT);
pinMode(relayL3, OUTPUT);
pinMode(relayL4, OUTPUT);
pinMode(relayCB, OUTPUT);
pinMode(relayR1, OUTPUT);
pinMode(relayR2, OUTPUT);
pinMode(relayR3, OUTPUT);
pinMode(relayR4, OUTPUT);
}
void loop() {
// reads state of each push button
pushbuttonState1 = digitalRead(pushbutton1);
pushbuttonState2 = digitalRead(pushbutton2);
pushbuttonState3 = digitalRead(pushbutton3);
pushbuttonState4 = digitalRead(pushbutton4);
pushbuttonState5 = digitalRead(pushbutton5);
pushbuttonState6 = digitalRead(pushbutton6);
// ----------RIGHT TURN------------
if ( pushbuttonState1 == true ){
digitalWrite(relayR2, HIGH);
digitalWrite(relayR3, HIGH);
digitalWrite(relayR4, HIGH);
delay(250);
digitalWrite(relayR2, LOW);
digitalWrite(relayR3, LOW) ;
digitalWrite(relayR4, LOW);
delay(250);
digitalWrite(relayR2, HIGH);
digitalWrite(relayR3, HIGH) ;
digitalWrite(relayR4, HIGH);
delay(250);
digitalWrite(relayR2, LOW);
digitalWrite(relayR3, LOW) ;
digitalWrite(relayR4, LOW);
delay(500);
}
// -----------LEFT TURN--------------
if ( pushbuttonState2 == true ){
digitalWrite(relayL2, HIGH) ;
digitalWrite(relayL3, HIGH) ;
digitalWrite(relayL4, HIGH);
delay(250);
digitalWrite(relayL2, LOW) ;
digitalWrite(relayL3, LOW) ;
digitalWrite(relayL4, LOW);
delay(250);
digitalWrite(relayL2, HIGH);
digitalWrite(relayL3, HIGH) ;
digitalWrite(relayL4, HIGH);
delay(250);
digitalWrite(relayL2, LOW) ;
digitalWrite(relayL3, LOW) ;
digitalWrite(relayL4, LOW);
delay(500);
}
// ----------ROUNDABOUT 1st EXIT---------
if ( pushbuttonState3 == true ){
//circle1 = start
digitalWrite(relayCB, HIGH);
delay(80);
digitalWrite(relayCB, LOW);
digitalWrite(relayL4, HIGH);
delay(80);
digitalWrite(relayL4, LOW);
digitalWrite(relayL3, HIGH);
delay(80);
digitalWrite(relayL3, LOW);
digitalWrite(relayL2, HIGH);
delay(80);
digitalWrite(relayL2, LOW);
digitalWrite(relayL1, HIGH);
delay(80);
digitalWrite(relayL1, LOW);
digitalWrite(relayCT, HIGH);
delay(80);
digitalWrite(relayCT, LOW);
digitalWrite(relayR1, HIGH);
delay(80);
digitalWrite(relayR1, LOW);
digitalWrite(relayR2, HIGH);
delay(80);
digitalWrite(relayR2, LOW);
digitalWrite(relayR3, HIGH);
delay(80);
digitalWrite(relayR3, LOW);
digitalWrite(relayR4, HIGH);
delay(80);
digitalWrite(relayR4, LOW);
delay(200);
//circle1 = end
digitalWrite(relayCB, HIGH);
delay(80);
digitalWrite(relayCB, LOW);
digitalWrite(relayL4, HIGH);
delay(80);
digitalWrite(relayL4, LOW);
digitalWrite(relayL3, HIGH);
delay(80);
digitalWrite(relayL3, LOW);
digitalWrite(relayL2, HIGH);
delay(80);
digitalWrite(relayL2, LOW);
digitalWrite(relayL1, HIGH);
delay(80);
digitalWrite(relayL1, LOW);
digitalWrite(relayCT, HIGH);
delay(80);
digitalWrite(relayCT, LOW);
digitalWrite(relayR1, HIGH);
delay(80);
digitalWrite(relayR1, LOW);
digitalWrite(relayR2, HIGH);
delay(80);
digitalWrite(relayR2, LOW);
digitalWrite(relayR3, HIGH);
delay(80);
digitalWrite(relayR3, LOW);
digitalWrite(relayR4, HIGH);
delay(80);
digitalWrite(relayR4, LOW);
delay(200);
//circle2 = end
digitalWrite(relayL2, HIGH);
digitalWrite(relayL3, HIGH) ;
digitalWrite(relayL4, HIGH);
delay(125);
digitalWrite(relayL2, LOW);
digitalWrite(relayL3, LOW) ;
digitalWrite(relayL4, LOW);
delay(125);
digitalWrite(relayL2, HIGH);
digitalWrite(relayL3, HIGH) ;
digitalWrite(relayL4, HIGH);
delay(125);
digitalWrite(relayL2, LOW);
digitalWrite(relayL3, LOW) ;
digitalWrite(relayL4, LOW);
delay(500);
}
// ----------ROUNDABOUT 2nd EXIT---------
if ( pushbuttonState4 == true ){
//circle1 = start
digitalWrite(relayCB, HIGH);
delay(80);
digitalWrite(relayCB, LOW);
digitalWrite(relayL4, HIGH);
delay(80);
digitalWrite(relayL4, LOW);
digitalWrite(relayL3, HIGH);
delay(80);
digitalWrite(relayL3, LOW);
digitalWrite(relayL2, HIGH);
delay(80);
digitalWrite(relayL2, LOW);
digitalWrite(relayL1, HIGH);
delay(80);
digitalWrite(relayL1, LOW);
digitalWrite(relayCT, HIGH);
delay(80);
digitalWrite(relayCT, LOW);
digitalWrite(relayR1, HIGH);
delay(80);
digitalWrite(relayR1, LOW);
digitalWrite(relayR2, HIGH);
delay(80);
digitalWrite(relayR2, LOW);
digitalWrite(relayR3, HIGH);
delay(80);
digitalWrite(relayR3, LOW);
digitalWrite(relayR4, HIGH);
delay(80);
digitalWrite(relayR4, LOW);
delay(200);
//circle1 = end
digitalWrite(relayCB, HIGH);
delay(80);
digitalWrite(relayCB, LOW);
digitalWrite(relayL4, HIGH);
delay(80);
digitalWrite(relayL4, LOW);
digitalWrite(relayL3, HIGH);
delay(80);
digitalWrite(relayL3, LOW);
digitalWrite(relayL2, HIGH);
delay(80);
digitalWrite(relayL2, LOW);
digitalWrite(relayL1, HIGH);
delay(80);
digitalWrite(relayL1, LOW);
digitalWrite(relayCT, HIGH);
delay(80);
digitalWrite(relayCT, LOW);
digitalWrite(relayR1, HIGH);
delay(80);
digitalWrite(relayR1, LOW);
digitalWrite(relayR2, HIGH);
delay(80);
digitalWrite(relayR2, LOW);
digitalWrite(relayR3, HIGH);
delay(80);
digitalWrite(relayR3, LOW);
digitalWrite(relayR4, HIGH);
delay(80);
digitalWrite(relayR4, LOW);
delay(200);
//circle2 = end
//2nd exit signal
digitalWrite(relayL1, HIGH);
digitalWrite(relayCT, HIGH) ;
digitalWrite(relayR1, HIGH);
delay(125);
digitalWrite(relayL1, LOW);
digitalWrite(relayCT, LOW) ;
digitalWrite(relayR1, LOW);
delay(125);
digitalWrite(relayL1, HIGH);
digitalWrite(relayCT, HIGH) ;
digitalWrite(relayR1, HIGH);
delay(125);
digitalWrite(relayL1, LOW);
digitalWrite(relayCT, LOW) ;
digitalWrite(relayR1, LOW);
delay(500);
}
}