shared

Dependencies:   mbed-rtos mbed

Fork of Boboobooo by kao yi

Revision:
8:089b778962c4
Parent:
7:fe8665daf3e7
--- a/camera_api.cpp	Mon Jul 07 06:52:03 2014 +0000
+++ b/camera_api.cpp	Fri Oct 31 10:54:51 2014 +0000
@@ -276,7 +276,6 @@
             
  
           line_CamR->enable();
-          line_CamL->enable();
           
           
        //input 128 //both  
@@ -287,13 +286,44 @@
              
              
              line_imageR[i]=line_CamR->read_u16();
-             line_imageL[i]=line_CamL->read_u16();
+
          
          //  big small    
              if(line_imageR[i] > w_f_vR) 
                 w_f_vR=line_imageR[i];
              else if(line_imageR[i] < b_f_vR )
-                b_f_vR = line_imageR[i];
+                b_f_vR = line_imageR[i]; 
+                            
+             
+             *cam_clk=0;
+             wait_us(3);
+        
+           
+           }
+           
+           
+          line_CamR->disable();
+          
+                  
+           *si=1;
+           *cam_clk=1;
+           
+           wait_us(30);   // tune here
+           *si=0;
+           *cam_clk=0;
+          
+          
+          line_CamL->enable();
+           //input 128 //both  
+          
+          for(int i=0;i<128;i++){     
+              *cam_clk=1;   
+              wait_us(3);
+             
+             
+             line_imageL[i]=line_CamL->read_u16();
+         
+         //  big small    
                 
                 
               if(line_imageL[i] > w_f_vL) 
@@ -309,10 +339,7 @@
         
            
            }
-           
-           
-          line_CamR->enable();
-          line_CamL->enable();
+          line_CamL->disable();
            
            
            //filter L R   //may change