 char CubeCopy [55];
 String SolvedCube = "";
 
-//Variables for virtual cube rotation
+//Variables for cube solving algorythms
 const byte v_map[12] PROGMEM = {'U', 'u', 'F', 'f', 'R', 'r', 'L', 'l', 'D', 'd', 'B', 'b'};
 const byte v_table [][40] PROGMEM = {
   {0, 1, 2, 3, 5, 6, 7, 8, 18, 19, 20, 9, 10, 11, 45, 46, 47, 36, 37, 38, 6, 3, 0, 7, 1, 8, 5, 2, 9, 10, 11, 45, 46, 47, 36, 37, 38, 18, 19, 20},                   //U

  for (byte j = 0; j<20; j++) {
    ScannedCube[pgm_read_byte(&(v_table[index][j]))] = CubeCopy[pgm_read_byte(&(v_table[index][j+20]))];
  }
  copyCube();
}


//General method for solivng the cube
void solveCube() {
  virtualMove('R');
  virtualMove('L');
  virtualMove('U');
  virtualMove('D');
  virtualMove('B');
  virtualMove('F');
  virtualMove('f');
  virtualMove('b');
  virtualMove('d');
  virtualMove('u');
  virtualMove('l');
  virtualMove('r');
  
  delay(1000);
}


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