http://www.emcu.eu/understand-the-way-to-use-hc-srf04-on-stm32-nucleo-board-and-mbed/
Understand the way to use HC-SRF04 on STM32 (Nucleo board) and mBED