   //delay(standardDelay);
 }
 
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////METHODS FOR SOLVING THE CUBE ON ARDUINO//////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+//Method for overwriting the cube copy
+void copyCube() {
+  for (byte i=0; i<55; i++) {
+    CubeCopy[i] = ScannedCube[i];
+  }
+  Serial.println(CubeCopy);
+}
+
+
+//Methods for virtual rotation of the cube
+void virtualMove(char v_move) {
+  byte index;
+  for (index = 0; index <13; index++) {
+    if (v_move == pgm_read_byte(&(v_map[index]))) {
+      break;
+    }
+  }
+  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);
+}
+

const byte Motor_4_ScanAngles [9] PROGMEM = {71, 74, 70, 74, 82, 73, 94, 90, 94};
//Arrays for side and cube scanning
char SideScanResult [10];
char ScannedCube [55];               // = "woybogwrybwbbwggygoyoogoryryowbrgyrwbybbyggwgrwrrbrowo";
String SolvedCube = "";
//Other global variables
byte cubeCounter;
char string1LCD [17];

}


//Method for general process of solving the cube on Arduino
void arduinoSolveOperation() {
  operateFlag = true;
  //scanCube();  ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  detachInterrupt(0);
  copyCube();
  solveCube();
  assembleCube(SolvedCube);
  detachInterrupt(0);
}



