Browse Source

最终版本

liuhao 3 years ago
parent
commit
384a2a11d7
1 changed files with 10 additions and 5 deletions
  1. 10 5
      TEST_Prj/esp8266tcp/tcp/tcp.ino

+ 10 - 5
TEST_Prj/esp8266tcp/tcp/tcp.ino

@@ -980,7 +980,7 @@ u8 CameraDemoApp(u8 Serialnumber,u8 nCameraImageSize)
     sendComBuff[4]=picLen;
     sendComBuff[4]=picLen;
     //UART2Write(sendComBuff,7);
     //UART2Write(sendComBuff,7);
     server_sendByte(sendComBuff,7);
     server_sendByte(sendComBuff,7);
-    delay(100);
+    delay(200);
     //分M次,每次读N_BYTE字节
     //分M次,每次读N_BYTE字节
     if( cntM )
     if( cntM )
     {
     {
@@ -1003,7 +1003,8 @@ u8 CameraDemoApp(u8 Serialnumber,u8 nCameraImageSize)
                server_sendByte(gprs_buf,N_BYTE);
                server_sendByte(gprs_buf,N_BYTE);
                 
                 
             }
             }
-            delay(50);
+            function_Star();
+            delay(20);
         }
         }
     }
     }
     //剩余图片长度
     //剩余图片长度
@@ -1120,6 +1121,7 @@ void setup() {
   {
   {
       while(1)
       while(1)
       {
       {
+        function_Star();
         swSer.println("\r\nCamera Init fail!\r\n");
         swSer.println("\r\nCamera Init fail!\r\n");
         delay(1000);     //
         delay(1000);     //
       }       
       }       
@@ -1128,9 +1130,10 @@ void setup() {
   {
   {
         swSer.println("\r\nCamera Init Success!\r\n");
         swSer.println("\r\nCamera Init Success!\r\n");
 //        GPIO_ResetBits(GPIOC,GPIO_Pin_13);
 //        GPIO_ResetBits(GPIOC,GPIO_Pin_13);
-//        delay_ms(200);     //在上电复位后要等1-2秒摄像头才能接收指令
-//        GPIO_SetBits(GPIOC,GPIO_Pin_13);//初始化成功短鸣一声并亮灯
-//        delay_ms(200);     //在上电复位后要等1-2秒摄像头才能接收指令
+      function_Star();
+     delay(200);     //在上电复位后要等1-2秒摄像头才能接收指令
+     function_Star();
+       delay(200);     //在上电复位后要等1-2秒摄像头才能接收指令
 //        GPIO_SetBits(GPIOC,GPIO_Pin_13);//初始化成功 亮灯
 //        GPIO_SetBits(GPIOC,GPIO_Pin_13);//初始化成功 亮灯
   }
   }
 }
 }
@@ -1179,6 +1182,8 @@ void loop() {
   {
   {
     CameraDemoApp(SERIAL_NUM_0,IMAGE_SIZE_160X120); 
     CameraDemoApp(SERIAL_NUM_0,IMAGE_SIZE_160X120); 
     getflag=0; 
     getflag=0; 
+    
   }
   }
+  digitalWrite(LED_PIN,0);
   delay(1);
   delay(1);
 }
 }