It seems like Maxbotix' XL-MaxSonar-EZ MB1240 is a bit of an odd bird for the RaspPi. You have a choice between analog or RS232 Vcc0 connection; the pulse width output also seems to be analog. Of course the Pi doesn't have any analog inputs without a breakout board, so the fallback is the RS232 output. It is documented by Maxbotix at http://www.maxbotix.com/articles/074.htm
, however those steps do not work for me. I think they might be using TTL instead of RS232, which the MB1240 does not appear to support.
UART expects inverted RS232, as bredman noticed in an earlier post (http://www.raspberrypi.org/phpBB3/viewt ... 45#p191545
). There isn't really a software solution it seems, because you have to also invert the stop/start bits. Or maybe there is using the WiringPi serial library?
I'm happy to use either pulse width representation or RS232, but it seems that the Pi supports neither. Any good ideas on how this proximity sensor might work? Or do I need to rely on some other analog/digital bridge?