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.
Dependents: burobo_reciverV2 Nucleo_Ultrasonic-HCSR4 Test_UltraSonic Ultrasonic2 ... more
Ultrasonic Range HCSR04
This is a very easy example for use my library,
easy example
/**main.cpp*/ #include "mbed.h" #include "hcsr04.h" //D12 TRIGGER D11 ECHO HCSR04 sensor(D12, D11); int main() { while(1) { long distance = sensor.distance(); printf("distanza %d \n",distance); wait(1.0); // 1 sec } }