void testColorSensors(){
  byte aColor = testColor(A_S2,A_S3,A_sensorOut,1);
  byte bColor = testColor(B_S2,B_S3,B_sensorOut,2);
  byte cColor = testColor(C_S2,C_S3,C_sensorOut,3);
  byte dColor = testColor(D_S2,D_S3,D_sensorOut,4);
  /*
  Serial.print("A: ");
  Serial.print(aColor);
  Serial.print(" B: ");
  Serial.print(bColor);
  Serial.print(" C: ");
  Serial.print(cColor);
  Serial.print(" D: ");
  Serial.println(dColor);
*/
  if(aColor == 1 && bColor == 1 && cColor == 1 && dColor == 1){
    digitalWrite(relayPin, LOW);
    complete = HIGH;
    Serial.println("Done");
  }
}

byte testColor(int S2, int S3, int sensorOut, int sensorNum){
  /*
   * 0 = Not Yellow
   * 1 = Yellow
   */
  //Serial.print(sensorNum);
  //Serial.print(" ");
  float White = testWhite(S2,S3,sensorOut,sensorNum);
  float Red = testRed(S2,S3,sensorOut,sensorNum);
  float Green = testGreen(S2,S3,sensorOut,sensorNum);
  float Blue = testBlue(S2,S3,sensorOut,sensorNum);
  float Re = Red/White;
  float Gr = Green/White;
  float Bl = Blue/White;
  bool diskColor = 0;
  float R;
  float G;
  float B;
  float W;
  
  if(sensorNum == 1){
    R = average(ArAvg, arSize, Re, sensorNum);
    G = average(AgAvg, arSize, Gr, sensorNum);
    B = average(AbAvg, arSize, Bl, sensorNum);
    W = average(AwAvg, arSize, White, sensorNum);
    
    
    /*
    Serial.print("w:");
    Serial.print(W);
    Serial.print(" awmin:");
    Serial.print(AwMin);
    Serial.print(" awmax:");
    Serial.print(AwMax);
    Serial.print(" inrange:");
    Serial.println(inRange(W,AwMin,AwMax));
    */
    if(inRange(W,AwMin,AwMax) && inRange(R, ArMin, ArMax) && inRange(G, AgMin, AgMax) && inRange(B, AbMin, AbMax)){
      diskColor = 1;
    }
  } else if(sensorNum == 2){
    R = average(BrAvg, arSize, Re, sensorNum);
    G = average(BgAvg, arSize, Gr, sensorNum);
    B = average(BbAvg, arSize, Bl, sensorNum);
    W = average(BwAvg, arSize, White, sensorNum);
    
    
    if(inRange(W,BwMin,BwMax) && inRange(R, BrMin, BrMax) && inRange(G, BgMin, BgMax) && inRange(B, BbMin, BbMax)){
      diskColor = 1;
    }
  } else if(sensorNum == 3){
    R = average(CrAvg, arSize, Re, sensorNum);
    G = average(CgAvg, arSize, Gr, sensorNum);
    B = average(CbAvg, arSize, Bl, sensorNum);
    W = average(CwAvg, arSize, White, sensorNum);
    

    
    if(inRange(W,CwMin,CwMax) && inRange(R, CrMin, CrMax) && inRange(G, CgMin, CgMax) && inRange(B, CbMin, CbMax)){
      diskColor = 1;
    }
  } else if(sensorNum == 4){
    //Serial.print("r:");
    R = average(DrAvg, arSize, Re, sensorNum);
    //Serial.print(R);
    //Serial.print("  g:");
    G = average(DgAvg, arSize, Gr, sensorNum);
    //Serial.print(G);
    //Serial.print("  b:");
    B = average(DbAvg, arSize, Bl, sensorNum);
    //Serial.println(B);
    W = average(DwAvg, arSize, White, sensorNum);
    /*
    Serial.print("r:");
    Serial.print(R);
    Serial.print(" g:");
    Serial.print(G);
    Serial.print(" b:");
    Serial.print(B);
    Serial.print(" w:");
    Serial.println(W);
    */
    if(inRange(W,DwMin,DwMax) && inRange(R, DrMin, DrMax) && inRange(G, DgMin, DgMax) && inRange(B, DbMin, DbMax)){
      diskColor = 1;
    }
  }
  return diskColor;
}
