splash pad

I am working on a backyard splash pad and would like to use Arduino Uno to control several sprinkler solenoids. Any help would be appreciated. My components are Arduino Uno 328, Opto-Isolated 8 Channel Relay Board, 5 Solenoids, Pump Control Relay, and the switches for Inputs Start / Stop (SPDT Momentary) & Trigger (SPDT Momentary)

my sketch so far...

// Splash Pad Controller // Press start to run a 15min cycle, press again to stop at any time // Press Trigger at any time with in the cycle and all solenoids // will close for a short time the open for a short time the return // to the regular cycle

int relay1 = 12; // assign Solenoid 1 to pin 12 int relay2 = 11; // assign Solenoid 2 to pin 11 int relay3 = 10; // assign Solenoid 3 to pin 10 int relay4 = 9; // assign Solenoid 4 to pin 9 int relay5 = 8; // assign Solenoid 5 to pin 8 int relay6 = 7; // not used int relay7 = 6; // not used int relay8 = 5; // assign pump relay to pin 5 int startButton = 2; // assign start / stop button to pin 2 int triggerButton = 3; // assign trigger button to pin 3 int cycleTime = 900000; // assign cycle time 15min

void setup() { pinMode(relay1, OUTPUT); // declare as output pinMode(relay2, OUTPUT); // declare as output pinMode(relay3, OUTPUT); // declare as output pinMode(relay4, OUTPUT); // declare as output pinMode(relay5, OUTPUT); // declare as output pinMode(relay8, OUTPUT); // declare as output pinMode(startButton, INPUT); // declare as input pinMode(triggerButton, INPUT); // declare as input }

void loop() { int starButtonState = digitalRead(startButton); if(starButtonState == HIGH) { digitalWrite(relay8, HIGH); digitalWrite(relay8, LOW); }

int triggerButtonState = digitalRead(triggerButton); if(triggerButtonState == HIGH) { triggerLoop(); } }

void triggerLoop() { digitalWrite(relay1, LOW); digitalWrite(relay2, LOW); digitalWrite(relay3, LOW); digitalWrite(relay4, LOW); digitalWrite(relay5, LOW); delay(1000); digitalWrite(relay1, HIGH); digitalWrite(relay2, HIGH); digitalWrite(relay3, HIGH); digitalWrite(relay4, HIGH); digitalWrite(relay5, HIGH); delay(2000); digitalWrite(relay1, LOW); digitalWrite(relay2, LOW); digitalWrite(relay3, LOW); digitalWrite(relay4, LOW); digitalWrite(relay5, LOW); delay(1000); }