Library 30- Measure distance with HC-SR04 and STM32F4 - STM32F4 Discovery
I have at least 10 HC-SR04 sensors at home so I decided to made a library for it. This sensor can measure distance between 2cm and 4meters. It can produce about 40 measurements per second. His working angle is about 15degrees, On the start, you have to send 10us starting pulse at TRIGGER pin. After that, on ECHO pin high pulse is returned in relation to the distance. Large distance means large high signal. You have to give sensor some time...
Post to Tumblr