Hello,
I tried it in original state (only mbed lib update to latest) and no compilation error. So you probably somewhere deleted end of parenthesis “)”.
Also I played with this sensor because of this topic.
- Original old version with old Mbed 2 HC-SR04 | Mbed
- Updated version for MbedOS6+ Nucleo_UltrasonicHelloWorld ( HC_SR04_Ultrasonic_Library).
BR, Jan