 //Setup method
 void setup() {
   // Initializing pins modes
-  //pinMode(S0, OUTPUT);
-  //pinMode(S1, OUTPUT);
-  //pinMode(S2, OUTPUT);
-  //pinMode(S3, OUTPUT);
-  //pinMode(scanSensor, INPUT);
   DDRB = B00011110;
 
   //Attaching the motors

      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]))];
  }
  Serial.print(F("Virtual move: "));
  Serial.println(v_move);
  copyCube();
}





//Function for detecting color (All devices and Arduino connected to power supply)
char defineColor() {
  if(f_RED>=f[0][0] && f_RED<=f[0][1] && f_GREEN>=f[0][2] && f_GREEN<=f[0][3] && f_BLUE>=f[0][4] && f_BLUE<=f[0][5]){
    return 'w';
  }
  else if(f_RED>=f[1][0] && f_RED<=f[1][1] && f_GREEN>=f[1][2] && f_GREEN<=f[1][3] && f_BLUE>=f[1][4] && f_BLUE<=f[1][5]){
    return 'y';
  }
  else if(f_RED>=f[2][0] && f_RED<=f[2][1] && f_GREEN>=f[2][2] && f_GREEN<=f[2][3] && f_BLUE>=f[2][4] && f_BLUE<=f[2][5]){
    return 'o';
  }
  else if(f_RED>=f[3][0] && f_RED<=f[3][1] && f_GREEN>=f[3][2] && f_GREEN<=f[3][3] && f_BLUE>=f[3][4] && f_BLUE<=f[3][5]){
    return 'r';
  }
  else if(f_RED>=f[4][0] && f_RED<=f[4][1] && f_GREEN>=f[4][2] && f_GREEN<=f[4][3] && f_BLUE>=f[4][4] && f_BLUE<=f[4][5]){
    return 'g';
  }
  else if(f_RED>=f[5][0] && f_RED<=f[5][1] && f_GREEN>=f[5][2] && f_GREEN<=f[5][3] && f_BLUE>=f[5][4] && f_BLUE<=f[5][5]){
    return 'b';
  }
  else {
