SRF04 & other Analog sensors on BB


So what is the standard protocol to interface generic analog sensors to the BB-xm.
I am specifically looking at the SRF04 Sonar sensor:

I guess some form of level shifting will be needed - using a potential divider perhaps ? - but is this possible ?

Best regards.

Looks like that device gives you a voltage pulse, and you need to measure the duration of the pulse. You’re probably going to need a custom piece of code in the Linux kernel that uses interrupts to measure the duration accurately enough to be meaningful. There is no “standard protocol” for this kind of thing, you need to design something.