Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Programme_course_vir_am_2 by
camera.cpp
00001 #include "Mlib.h" 00002 00003 /****************CAMERA****************/ 00004 void F_GetData() 00005 { 00006 timer.reset(); 00007 begin = timer.read_us(); 00008 SI = 0; 00009 char numero_data = 0; 00010 while(timer.read_us() < begin+tempsInte); 00011 clk_active = 1; 00012 Impulse_SI(); 00013 while(CLK.read() == 0); 00014 cam_data[0] = AIN.read_u16()>>8; 00015 while(CLK.read() == 1); 00016 00017 for(numero_data = 1; numero_data < 128; numero_data++) 00018 { 00019 while(CLK.read() == 0);//On attends le front montant 00020 cam_data[numero_data] = AIN.read_u16()>>8;//mémorisation des données 00021 while(CLK.read() == 1);//on attends le front descendant 00022 } 00023 00024 clk_active = 0; 00025 SI = 1; 00026 00027 } 00028 00029 void F_CLK() 00030 { 00031 if(clk_active) 00032 { 00033 CLK = 1-CLK; 00034 } 00035 } 00036 00037 void Impulse_SI() 00038 { 00039 while(CLK == 0); 00040 while(CLK == 1); 00041 SI = 1; 00042 while(CLK == 0); 00043 SI = 0; 00044 }
Generated on Tue Jul 12 2022 16:20:08 by
1.7.2
