     digitalWrite(solenoidPins[shooterNum],HIGH); //Activate the solenoid: open the passage
     digitalWrite(ledPins[shooterNum],HIGH); //Turn on the respective LED
 
-    ballReleaseTimer[shooterNum]=millis()+ballReleaseTime; //Set the timer for deactivating the solenoid
-    ballReleasing[shooterNum]=1; //Indicate that we are releasing a ball
-  }
-}
-
-/*▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
-/*checkSolenoids
-/*******************************************************************************************/
-//Check whether there are any solenoids that need to be deactivated
-void checkSolenoids(){
-  for (byte i=1;i<4;i++){ //Check all 3 solenoids
-    if (ballReleasing[i]==1){ //If a ball is currently being released
-      if (millis()>ballReleaseTimer[i]){ //If enough time has passed
-        digitalWrite(solenoidPins[i],LOW); //Deactivate the solenoid: close the passage
-        digitalWrite(ledPins[i],LOW); //Turn off the respective LED
-        ballReleasing[i]=0; //Indicate that the ball is no longer being released
-#if DEBUG==1
-        Serial.print("Deactivating solenoid: ");
-        Serial.println(i);
-#endif
-      }
-    }
-  }
-}
-
+    //With interrupts, set the timed interrupt
+    timedInterrupt(shooterNum, ballReleaseInt); //Should be 547 for 35mS
+
+    //Below is the code before interrupts
+    //ballReleaseTimer[shooterNum]=millis()+ballReleaseTime; //Set the timer for deactivating the solenoid
+    //ballReleasing[shooterNum]=1; //Indicate that we are releasing a ball
+  }
+}
 
 /*▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
 /*sendMessage

/*******************************************************************************************/
#define DEBUG 0 //Defining DEBUG turns ON debugging messages

#define killMsgSend 1 //Prevents the arduino from sending the functional messages to the laptop

#define commsTimeout 200 //The maximum time that a received serial command can take, in mS

#define ballReleaseTime 35 //The time that the solenoid needs to be activated for to release a ball, in mS

#define angleLowest 30 //The minimum allowable angle
#define angleHighest 150 //The maximum allowable angle

  //Send 'Game Start' message to laptop
  sendMessage(0x80);

}


