     break;
     case 0x40:
     myCAM.OV5642_set_Light_Mode(Advanced_AWB);temp = 0xff;
-     Serial.println(F("ACK CMD Set to Advanced_AWB"));break;
+     Serial.println(F("ACK CMD Set to Advanced_AWB END"));break;
     case 0x41:
     myCAM.OV5642_set_Light_Mode(Simple_AWB);temp = 0xff;
-     Serial.println(F("ACK CMD Set to Simple_AWB"));break;
+     Serial.println(F("ACK CMD Set to Simple_AWB END"));break;
      case 0x42:
     myCAM.OV5642_set_Light_Mode(Manual_day);temp = 0xff;
-     Serial.println(F("ACK CMD Set to Manual_day"));break;
+     Serial.println(F("ACK CMD Set to Manual_day END"));break;
      case 0x43:
     myCAM.OV5642_set_Light_Mode(Manual_A);temp = 0xff;
-     Serial.println(F("ACK CMD Set to Manual_A"));break;
+     Serial.println(F("ACK CMD Set to Manual_A END"));break;
      case 0x44:
     myCAM.OV5642_set_Light_Mode(Manual_cwf);temp = 0xff;
-     Serial.println(F("ACK CMD Set to Manual_cwf"));break;
+     Serial.println(F("ACK CMD Set to Manual_cwf END"));break;
      case 0x45:
     myCAM.OV5642_set_Light_Mode(Manual_cloudy);temp = 0xff;
-     Serial.println(F("ACK CMD Set to Manual_cloudy"));break;
+     Serial.println(F("ACK CMD Set to Manual_cloudy END"));break;
       case 0x50:
     myCAM.OV5642_set_Color_Saturation(Saturation4);temp = 0xff;
-     Serial.println(F("ACK CMD Set to Saturation+4"));break;
+     Serial.println(F("ACK CMD Set to Saturation+4 END"));break;
    case 0x51:
       myCAM.OV5642_set_Color_Saturation(Saturation3);temp = 0xff;
-     Serial.println(F("ACK CMD Set to Saturation+3"));break;
+     Serial.println(F("ACK CMD Set to Saturation+3 END"));break;
    case 0x52:
     myCAM.OV5642_set_Color_Saturation(Saturation2);temp = 0xff;
-   Serial.println(F("ACK CMD Set to Saturation+2"));break;
+   Serial.println(F("ACK CMD Set to Saturation+2 END"));break;
   case 0x53:
     myCAM.OV5642_set_Color_Saturation(Saturation1);temp = 0xff;
-   Serial.println(F("ACK CMD Set to Saturation+1"));break;
+   Serial.println(F("ACK CMD Set to Saturation+1 END"));break;
    case 0x54:
     myCAM.OV5642_set_Color_Saturation(Saturation0);temp = 0xff;
-   Serial.println(F("ACK CMD Set to Saturation+0"));break;
+   Serial.println(F("ACK CMD Set to Saturation+0 END"));break;
    case 0x55:
     myCAM.OV5642_set_Color_Saturation(Saturation_1);temp = 0xff;
-   Serial.println(F("ACK CMD Set to Saturation-1"));break;
+   Serial.println(F("ACK CMD Set to Saturation-1 END"));break;
    case 0x56:
     myCAM.OV5642_set_Color_Saturation(Saturation_2);temp = 0xff;
    Serial.println(F("ACK CMD Set to Saturation-2"));break;
     case 0x57:
     myCAM.OV5642_set_Color_Saturation(Saturation_3);temp = 0xff;
-   Serial.println(F("ACK CMD Set to Saturation-3"));break;
+   Serial.println(F("ACK CMD Set to Saturation-3 END"));break;
    case 0x58:
   myCAM.OV5642_set_Light_Mode(Saturation_4);temp = 0xff;
-   Serial.println(F("ACK CMD Set to Saturation-4"));break; 
+   Serial.println(F("ACK CMD Set to Saturation-4 END"));break; 
    case 0x60:
   myCAM.OV5642_set_Brightness(Brightness4);temp = 0xff;
-   Serial.println(F("ACK CMD Set to Brightness+4"));break;
+   Serial.println(F("ACK CMD Set to Brightness+4 END"));break;
   case 0x61:
   myCAM.OV5642_set_Brightness(Brightness3);temp = 0xff;
-   Serial.println(F("ACK CMD Set to Brightness+3"));break; 
+   Serial.println(F("ACK CMD Set to Brightness+3 END"));break; 
   case 0x62:
   myCAM.OV5642_set_Brightness(Brightness2);temp = 0xff;
-   Serial.println(F("ACK CMD Set to Brightness+2"));break; 
+   Serial.println(F("ACK CMD Set to Brightness+2 END"));break; 
    case 0x63:
   myCAM.OV5642_set_Brightness(Brightness1);temp = 0xff;
-   Serial.println(F("ACK CMD Set to Brightness+1"));break; 
+   Serial.println(F("ACK CMD Set to Brightness+1 END"));break; 
    case 0x64:
   myCAM.OV5642_set_Brightness(Brightness0);temp = 0xff;
-   Serial.println(F("ACK CMD Set to Brightness+0"));break; 
+   Serial.println(F("ACK CMD Set to Brightness+0 END"));break; 
     case 0x65:
   myCAM.OV5642_set_Brightness(Brightness_1);temp = 0xff;
-   Serial.println(F("ACK CMD Set to Brightness-1"));break; 
+   Serial.println(F("ACK CMD Set to Brightness-1 END"));break; 
      case 0x66:
   myCAM.OV5642_set_Brightness(Brightness_2);temp = 0xff;
-   Serial.println(F("ACK CMD Set to Brightness-2"));break; 
+   Serial.println(F("ACK CMD Set to Brightness-2 END"));break; 
     case 0x67:
   myCAM.OV5642_set_Brightness(Brightness_3);temp = 0xff;
-   Serial.println(F("ACK CMD Set to Brightness-3"));break; 
+   Serial.println(F("ACK CMD Set to Brightness-3 END"));break; 
     case 0x68:
   myCAM.OV5642_set_Brightness(Brightness_4);temp = 0xff;
-   Serial.println(F("ACK CMD Set to Brightness-4"));break;
+   Serial.println(F("ACK CMD Set to Brightness-4 END"));break;
 case 0x70:
   myCAM.OV5642_set_Contrast(Contrast4);temp = 0xff;
-   Serial.println(F("ACK CMD Set to Contrast+4"));break;
+   Serial.println(F("ACK CMD Set to Contrast+4 END"));break;
   case 0x71:
   myCAM.OV5642_set_Contrast(Contrast3);temp = 0xff;
-   Serial.println(F("ACK CMD Set to Contrast+3"));break; 
+   Serial.println(F("ACK CMD Set to Contrast+3 END"));break; 
   case 0x72:
   myCAM.OV5642_set_Contrast(Contrast2);temp = 0xff;
-   Serial.println(F("ACK CMD Set to Contrast+2"));break; 
+   Serial.println(F("ACK CMD Set to Contrast+2 END"));break; 
    case 0x73:
   myCAM.OV5642_set_Contrast(Contrast1);temp = 0xff;
-   Serial.println(F("ACK CMD Set to Contrast+1"));break; 
+   Serial.println(F("ACK CMD Set to Contrast+1 END"));break; 
    case 0x74:
   myCAM.OV5642_set_Contrast(Contrast0);temp = 0xff;
-   Serial.println(F("ACK CMD Set to Contrast+0"));break; 
+   Serial.println(F("ACK CMD Set to Contrast+0 END"));break; 
     case 0x75:
   myCAM.OV5642_set_Contrast(Contrast_1);temp = 0xff;
-   Serial.println(F("ACK CMD Set to Contrast-1"));break; 
+   Serial.println(F("ACK CMD Set to Contrast-1 END"));break; 
      case 0x76:
   myCAM.OV5642_set_Contrast(Contrast_2);temp = 0xff;
-   Serial.println(F("ACK CMD Set to Contrast-2"));break; 
+   Serial.println(F("ACK CMD Set to Contrast-2 END"));break; 
     case 0x77:
   myCAM.OV5642_set_Contrast(Contrast_3);temp = 0xff;
-   Serial.println(F("ACK CMD Set to Contrast-3"));break; 
+   Serial.println(F("ACK CMD Set to Contrast-3 END"));break; 
     case 0x78:
   myCAM.OV5642_set_Contrast(Contrast_4);temp = 0xff;
-   Serial.println(F("ACK CMD Set to Contrast-4"));break;
+   Serial.println(F("ACK CMD Set to Contrast-4 END"));break;
    case 0x80: 
     myCAM.OV5642_set_hue(degree_180);temp = 0xff;
-     Serial.println(F("ACK CMD Set to -180 degree"));break;   
+     Serial.println(F("ACK CMD Set to -180 degree END"));break;   
    case 0x81: 
    myCAM.OV5642_set_hue(degree_150);temp = 0xff;
-     Serial.println(F("ACK CMD Set to -150 degree"));break;  
+     Serial.println(F("ACK CMD Set to -150 degree END"));break;  
    case 0x82: 
    myCAM.OV5642_set_hue(degree_120);temp = 0xff;
-     Serial.println(F("ACK CMD Set to -120 degree"));break;  
+     Serial.println(F("ACK CMD Set to -120 degree END"));break;  
    case 0x83: 
    myCAM.OV5642_set_hue(degree_90);temp = 0xff;
-     Serial.println(F("ACK CMD Set to -90 degree"));break;   
+     Serial.println(F("ACK CMD Set to -90 degree END"));break;   
     case 0x84: 
    myCAM.OV5642_set_hue(degree_60);temp = 0xff;
-     Serial.println(F("ACK CMD Set to -60 degree"));break;   
+     Serial.println(F("ACK CMD Set to -60 degree END"));break;   
     case 0x85: 
    myCAM.OV5642_set_hue(degree_30);temp = 0xff;
-     Serial.println(F("ACK CMD Set to -30 degree"));break;  
+     Serial.println(F("ACK CMD Set to -30 degree END"));break;  
      case 0x86: 
    myCAM.OV5642_set_hue(degree_0);temp = 0xff;
-     Serial.println(F("ACK CMD Set to 0 degree"));break; 
+     Serial.println(F("ACK CMD Set to 0 degree END"));break; 
    case 0x87: 
    myCAM.OV5642_set_hue(degree30);temp = 0xff;
-     Serial.println(F("ACK CMD Set to 30 degree"));break;
+     Serial.println(F("ACK CMD Set to 30 degree END"));break;
    case 0x88: 
    myCAM.OV5642_set_hue(degree60);temp = 0xff;
-     Serial.println(F("ACK CMD Set to 60 degree"));break;
+     Serial.println(F("ACK CMD Set to 60 degree END"));break;
     case 0x89: 
    myCAM.OV5642_set_hue(degree90);temp = 0xff;
-     Serial.println(F("ACK CMD Set to 90 degree"));break;
+     Serial.println(F("ACK CMD Set to 90 degree END"));break;
      case 0x8a: 
    myCAM.OV5642_set_hue(degree120);temp = 0xff;
-     Serial.println(F("ACK CMD Set to 120 degree"));break ; 
+     Serial.println(F("ACK CMD Set to 120 degree END"));break ; 
    case 0x8b: 
    myCAM.OV5642_set_hue(degree150);temp = 0xff;
-     Serial.println(F("ACK CMD Set to 150 degree"));break ;
+     Serial.println(F("ACK CMD Set to 150 degree END"));break ;
    case 0x90: 
    myCAM.OV5642_set_Special_effects(Normal);temp = 0xff;
-     Serial.println(F("ACK CMD Set to Normal"));break ;
+     Serial.println(F("ACK CMD Set to Normal END"));break ;
       case 0x91: 
    myCAM.OV5642_set_Special_effects(BW);temp = 0xff;
-     Serial.println(F("ACK CMD Set to BW"));break ;
+     Serial.println(F("ACK CMD Set to BW END"));break ;
     case 0x92: 
    myCAM.OV5642_set_Special_effects(Bluish);temp = 0xff;
-     Serial.println(F("ACK CMD Set to Bluish"));break ;
+     Serial.println(F("ACK CMD Set to Bluish END"));break ;
       case 0x93: 
    myCAM.OV5642_set_Special_effects(Sepia);temp = 0xff;
-     Serial.println(F("ACK CMD Set to Sepia"));break ;
+     Serial.println(F("ACK CMD Set to Sepia END"));break ;
     case 0x94: 
    myCAM.OV5642_set_Special_effects(Reddish);temp = 0xff;
-     Serial.println(F("ACK CMD Set to Reddish"));break ;
+     Serial.println(F("ACK CMD Set to Reddish END"));break ;
    case 0x95: 
    myCAM.OV5642_set_Special_effects(Greenish);temp = 0xff;
-     Serial.println(F("ACK CMD Set to Greenish"));break ;
+     Serial.println(F("ACK CMD Set to Greenish END"));break ;
    case 0x96: 
    myCAM.OV5642_set_Special_effects(Negative);temp = 0xff;
-     Serial.println(F("ACK CMD Set to Negative"));break ;
+     Serial.println(F("ACK CMD Set to Negative END"));break ;
    case 0xA0: 
    myCAM.OV5642_set_Exposure_level(Exposure_17_EV);temp = 0xff;
      Serial.println(F("ACK CMD Set to -1.7EV"));break ;  
      case 0xA1: 
    myCAM.OV5642_set_Exposure_level(Exposure_13_EV);temp = 0xff;
-     Serial.println(F("ACK CMD Set to -1.3EV"));break ;
+     Serial.println(F("ACK CMD Set to -1.3EV END"));break ;
       case 0xA2: 
    myCAM.OV5642_set_Exposure_level(Exposure_10_EV);temp = 0xff;
-     Serial.println(F("ACK CMD Set to -1.0EV"));break ; 
+     Serial.println(F("ACK CMD Set to -1.0EV END"));break ; 
     case 0xA3: 
    myCAM.OV5642_set_Exposure_level(Exposure_07_EV);temp = 0xff;
-     Serial.println(F("ACK CMD Set to -0.7EV"));break ;
+     Serial.println(F("ACK CMD Set to -0.7EV END"));break ;
      case 0xA4: 
    myCAM.OV5642_set_Exposure_level(Exposure_03_EV);temp = 0xff;
-     Serial.println(F("ACK CMD Set to -0.3EV"));break ;
+     Serial.println(F("ACK CMD Set to -0.3EV END"));break ;
    case 0xA5: 
    myCAM.OV5642_set_Exposure_level(Exposure_default);temp = 0xff;
-     Serial.println(F("ACK CMD Set to -Exposure_default"));break ;
+     Serial.println(F("ACK CMD Set to -Exposure_default END"));break ;
     case 0xA6: 
    myCAM.OV5642_set_Exposure_level(Exposure07_EV);temp = 0xff;
-     Serial.println(F("ACK CMD Set to 0.7EV"));break ;  
+     Serial.println(F("ACK CMD Set to 0.7EV END"));break ;  
    case 0xA7: 
    myCAM.OV5642_set_Exposure_level(Exposure10_EV);temp = 0xff;
-     Serial.println(F("ACK CMD Set to 1.0EV"));break ;
+     Serial.println(F("ACK CMD Set to 1.0EV END"));break ;
     case 0xA8: 
    myCAM.OV5642_set_Exposure_level(Exposure13_EV);temp = 0xff;
-     Serial.println(F("ACK CMD Set to 1.3EV"));break ; 
+     Serial.println(F("ACK CMD Set to 1.3EV END"));break ; 
     case 0xA9: 
    myCAM.OV5642_set_Exposure_level(Exposure17_EV);temp = 0xff;
-     Serial.println(F("ACK CMD Set to 1.7EV"));break ; 
+     Serial.println(F("ACK CMD Set to 1.7EV END"));break ; 
    case 0xB0: 
    myCAM.OV5642_set_Sharpness(Auto_Sharpness_default);temp = 0xff;
-     Serial.println(F("ACK CMD Set to Auto Sharpness default"));break ; 
+     Serial.println(F("ACK CMD Set to Auto Sharpness default END"));break ; 
     case 0xB1: 
    myCAM.OV5642_set_Sharpness(Auto_Sharpness1);temp = 0xff;
-     Serial.println(F("ACK CMD Set to Auto Sharpness +1"));break ; 
+     Serial.println(F("ACK CMD Set to Auto Sharpness +1 END"));break ; 
     case 0xB2: 
    myCAM.OV5642_set_Sharpness(Auto_Sharpness2);temp = 0xff;
-     Serial.println(F("ACK CMD Set to Auto Sharpness +2"));break ; 
+     Serial.println(F("ACK CMD Set to Auto Sharpness +2 END"));break ; 
       case 0xB3: 
    myCAM.OV5642_set_Sharpness(Manual_Sharpnessoff);temp = 0xff;
-     Serial.println(F("ACK CMD Set to Auto Manual Sharpness off"));break ; 
+     Serial.println(F("ACK CMD Set to Auto Manual Sharpness off END"));break ; 
      case 0xB4: 
      myCAM.OV5642_set_Sharpness(Manual_Sharpness1);temp = 0xff;
-     Serial.println(F("ACK CMD Set to Auto Manual Sharpness +1"));break ;
+     Serial.println(F("ACK CMD Set to Auto Manual Sharpness +1 END"));break ;
      case 0xB5: 
      myCAM.OV5642_set_Sharpness(Manual_Sharpness2);temp = 0xff;
-     Serial.println(F("ACK CMD Set to Auto Manual Sharpness +2"));break ; 
+     Serial.println(F("ACK CMD Set to Auto Manual Sharpness +2 END"));break ; 
      case 0xB6: 
      myCAM.OV5642_set_Sharpness(Manual_Sharpness3);temp = 0xff;
-     Serial.println(F("ACK CMD Set to Auto Manual Sharpness +3"));break ;
+     Serial.println(F("ACK CMD Set to Auto Manual Sharpness +3 END"));break ;
      case 0xB7: 
      myCAM.OV5642_set_Sharpness(Manual_Sharpness4);temp = 0xff;
-     Serial.println(F("ACK CMD Set to Auto Manual Sharpness +4"));break ;
+     Serial.println(F("ACK CMD Set to Auto Manual Sharpness +4 END"));break ;
     case 0xB8: 
      myCAM.OV5642_set_Sharpness(Manual_Sharpness5);temp = 0xff;
-     Serial.println(F("ACK CMD Set to Auto Manual Sharpness +5"));break ;  
+     Serial.println(F("ACK CMD Set to Auto Manual Sharpness +5 END"));break ;  
     case 0xC0: 
      myCAM.OV5642_set_Mirror_Flip(MIRROR);temp = 0xff;
-     Serial.println(F("ACK CMD Set to MIRROR"));break ;  
+     Serial.println(F("ACK CMD Set to MIRROR END"));break ;  
     case 0xC1: 
      myCAM.OV5642_set_Mirror_Flip(FLIP);temp = 0xff;
-     Serial.println(F("ACK CMD Set to FLIP"));break ; 
+     Serial.println(F("ACK CMD Set to FLIP END"));break ; 
     case 0xC2: 
      myCAM.OV5642_set_Mirror_Flip(MIRROR_FLIP);temp = 0xff;
-     Serial.println(F("ACK CMD Set to MIRROR&FLIP"));break ;
+     Serial.println(F("ACK CMD Set to MIRROR&FLIP END"));break ;
     case 0xC3: 
      myCAM.OV5642_set_Mirror_Flip(Normal);temp = 0xff;
-     Serial.println(F("ACK CMD Set to Normal"));break ;
+     Serial.println(F("ACK CMD Set to Normal END"));break ;
      case 0xD0: 
      myCAM.OV5642_set_Compress_quality(high_quality);temp = 0xff;
-     Serial.println(F("ACK CMD Set to high quality"));break ;
+     Serial.println(F("ACK CMD Set to high quality END"));break ;
       case 0xD1: 
      myCAM.OV5642_set_Compress_quality(default_quality);temp = 0xff;
-     Serial.println(F("ACK CMD Set to default quality"));break ;
+     Serial.println(F("ACK CMD Set to default quality END"));break ;
       case 0xD2: 
      myCAM.OV5642_set_Compress_quality(low_quality);temp = 0xff;
-     Serial.println(F("ACK CMD Set to low quality"));break ;
+     Serial.println(F("ACK CMD Set to low quality END"));break ;
 
       case 0xE0: 
      myCAM.OV5642_Test_Pattern(Color_bar);temp = 0xff;
-     Serial.println(F("ACK CMD Set to Color bar"));break ;
+     Serial.println(F("ACK CMD Set to Color bar END"));break ;
       case 0xE1: 
      myCAM.OV5642_Test_Pattern(Color_square);temp = 0xff;
-     Serial.println(F("ACK CMD Set to Color square"));break ;
+     Serial.println(F("ACK CMD Set to Color square END"));break ;
       case 0xE2: 
      myCAM.OV5642_Test_Pattern(BW_square);temp = 0xff;
-     Serial.println(F("ACK CMD Set to BW square"));break ;
+     Serial.println(F("ACK CMD Set to BW square END"));break ;
      case 0xE3: 
      myCAM.OV5642_Test_Pattern(DLI);temp = 0xff;
-     Serial.println(F("ACK CMD Set to DLI"));break ;
+     Serial.println(F("ACK CMD Set to DLI END"));break ;
       default:
       break;
   }

        else if ((temp == 0xD8) & (temp_last == 0xFF))
        {
          is_header = true;
          Serial.println(F("ACK IMG"));
          Serial.write(temp_last);
          Serial.write(temp);
        }

  }
  if (myCAM.get_bit(ARDUCHIP_TRIG, CAP_DONE_MASK))
  {
    Serial.println(F("ACK CMD CAM Capture Done. END"));delay(50);
    read_fifo_burst(myCAM);
    //Clear the capture done flag
    myCAM.clear_fifo_flag();
