SRF04 & other Analog sensors on BB

All,

So what is the standard protocol to interface generic analog sensors to the BB-xm.
I am specifically looking at the SRF04 Sonar sensor: http://2r-he.blogspot.com/2009/10/devantech-srf04-ultrasonic-transmitter.html

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.