Hello!
If you look for SRF04.c on the net you will find many examples.
That said, the best method would be to do it yourself and understand what you are doing. As far as I remember, it delivers a pulse (receive pulse), the length of which is related to the distance. So basically, here is how to measure.
- Set up a timer with some clock. The higher the frequency the better.
- Trigger your timer start with a rising edge interrupt
- Trigger your timer stop with a falling edge interrupt
That's it, you get the value.
Have fun!
Dora