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 "hcsr04.h" 00003 00004 00005 //******* puerto serie *********// 00006 Serial Mbed(PB_6, PB_7); 00007 00008 HCSR04 usensor(PA_13,PA_15); 00009 00010 float dist; 00011 00012 int main() 00013 { 00014 00015 Mbed.printf("AT+RESET\n\CR"); 00016 Mbed.printf("Let's Work !! \n"); 00017 while(1) { 00018 usensor.start(); 00019 wait_ms(500); 00020 dist=usensor.get_dist_cm(); 00021 Mbed.printf("\n cm:%.3f",dist ); 00022 00023 00024 } 00025 }
Generated on Sun Aug 7 2022 16:49:30 by
1.7.2