Fork of original https://os.mbed.com/components/HC-SR04/ and update for MbedOS6+
Dependencies: HC_SR04_Ultrasonic_Library
Diff: main.cpp
- Revision:
- 2:dcd99bcaeaec
- Parent:
- 1:4a5586eb1765
--- a/main.cpp Thu Dec 04 08:04:55 2014 +0000 +++ b/main.cpp Thu Jun 10 18:49:38 2021 +0000 @@ -7,7 +7,7 @@ printf("Distance changed to %dmm\r\n", distance); } -ultrasonic mu(D8, D9, .1, 1, &dist); //Set the trigger pin to D8 and the echo pin to D9 +ultrasonic mu(D8, D9, 100ms, 1s, &dist); //Set the trigger pin to D8 and the echo pin to D9 //have updates every .1 seconds and a timeout after 1 //second, and call dist when the distance changes