 }
 
 
-//Function that repeats scanning up to 3 times if the color was not defined
+//Function that repeats scanning up to 10 times if the color was not defined
 char scanResult(){
   char color;
   byte wrongScan = 0;
   do{
     scan_item();
-    color = defineColor(f_RED, f_GREEN, f_BLUE);
+    //color = defineColor(f_RED, f_GREEN, f_BLUE);
+    color = defineColor();
     wrongScan++ ;
     if (color != 'X') { 
       break;

          }
          
          //else if ((ScannedCube[28] == f_color) && (ScannedCube[25] == d_color)) {          -----maybe to be deleted
          else if (ScannedCube[25] == d_color) {
              virtualSequence(F("fDrd"));
          }
      }
      
      if (ScannedCube[23] == d_color) {
              if (ScannedCube[12] == r_color) {
                  virtualMove('r');

  //scanCube();  ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  detachInterrupt(0);
  copyCube();
  virtualSequence(F("RDURL"));  //"RDURL"
  solveCube();
  assembleCube(SolvedCube);
  detachInterrupt(0);
