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.
main.cpp
00001 #include "mbed.h" 00002 #include "fct.h" 00003 #include "Pixy.h" 00004 #include "PixyLink.h" 00005 #include "SRF05.h" 00006 00007 #define V_max 25 00008 #define V_recherche 25 00009 #define K 0.1 00010 DigitalOut cs(p13); 00011 DigitalIn bp(p14); 00012 Serial pc (USBTX,USBRX); 00013 SRF05 us_arr(p8,p24); 00014 00015 int main() 00016 { 00017 MotG.period(PERIOD); 00018 MotD.period(PERIOD); 00019 float us_arriere; 00020 Vitmoteur(0.0,0.0); 00021 while(1) { 00022 00023 //printf("Us_arriere : %.1f\n\r", us_arr.read()); 00024 us_arriere=us_arr.read(); 00025 if(us_arriere>20) { 00026 Vitmoteur(-30,-30); 00027 } 00028 else{ 00029 Vitmoteur(0,0); 00030 } 00031 } 00032 00033 } 00034 00035 00036 00037
Generated on Fri Aug 19 2022 21:02:29 by
1.7.2