   myCAM.write_reg(ARDUCHIP_TEST1, 0x55);
   temp = myCAM.read_reg(ARDUCHIP_TEST1);
   if (temp != 0x55){
-    Serial.println(F("ACK CMD SPI interface Error!"));
+    Serial.println(F("ACK CMD SPI interface Error! END"));
     delay(1000);continue;
   }else{
-    Serial.println(F("ACK CMD SPI interface OK."));break;
+    Serial.println(F("ACK CMD SPI interface OK. END"));break;
   }
 }
   while(1){

  {
     case 0:
      myCAM.OV5640_set_JPEG_size(OV5640_320x240);delay(1000);
      Serial.println(F("ACK CMD switch to OV5640_320x240"));
    temp=0xff;
    break;
    case 1:
      myCAM.OV5640_set_JPEG_size(OV5640_352x288);delay(1000);
      Serial.println(F("ACK CMD switch to OV5640_352x288"));
    temp=0xff;
    break;
    case 2:
      myCAM.OV5640_set_JPEG_size(OV5640_640x480);delay(1000);
      Serial.println(F("ACK CMD switch to OV5640_640x480"));
  
    temp=0xff;
    break;
    case 3:
      myCAM.OV5640_set_JPEG_size(OV5640_800x480);delay(1000);
      Serial.println(F("ACK CMD switch to OV5640_800x480"));
    temp=0xff;
    break;
    case 4:
      myCAM.OV5640_set_JPEG_size(OV5640_1024x768);delay(1000);
      Serial.println(F("ACK CMD switch to OV5640_1024x768"));
   
    temp=0xff;
    break;
    case 5:
      myCAM.OV5640_set_JPEG_size(OV5640_1280x960);delay(1000);
      Serial.println(F("ACK CMD switch to OV5640_1280x960"));
 
    temp=0xff;
    break;
    case 6:
      myCAM.OV5640_set_JPEG_size(OV5640_1600x1200);delay(1000);
      Serial.println(F("ACK CMD switch to OV5640_1600x1200"));
 
    temp=0xff;
    break;
      case 7:
      myCAM.OV5640_set_JPEG_size(OV5640_2048x1536);delay(1000);
      Serial.println(F("ACK CMD switch to OV5640_2048x1536"));
      temp=0xff;
      break;
      case 8:
      myCAM.OV5640_set_JPEG_size(OV5640_2592x1944);delay(1000);
      Serial.println(F("ACK CMD switch to OV5640_2592x1944"));
      temp=0xff;
      break;
   case 0x10:
    mode = 1;
    start_capture = 1;
    Serial.println(F("ACK CMD CAM start single shoot."));
    break;
    case 0x11: 
    temp = 0xff;

  Serial.println(length, DEC);
  if (length >= MAX_FIFO_SIZE) //512 kb
  {
    Serial.println(F("ACK CMD Over size. END"));
    return 0;
  }
  if (length == 0 ) //0 kb
