1

I am trying to read data from a LV-MaxSonar-EZ0's TX pin connected to the RX pin on a Raspberry Pi Zero W. The problem I'm running into is that the data I'm getting does not fit what the sensor's datasheet is specifying. According to that I should be receiving data in all ASCII. An ASCII 'R' followed by three ASCII numbers and a carriage return (ASCII 13).

When I fire up minicom with the command minicom -b 9600 -w -o -H -D /dev/serial0 I get the following:

00 00 00 00 00 00 00 00 00 00 00 00 d8 05 c0 06 f6 ac 0f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 d8 05 c0 06 f6 ac 0f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 d8 05 c0 06 f6 ac 0f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 d8 05 c0 06 f6 ac 0f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 d8 05 c0 06 f6 ac 0f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 d8 05 c0 06 f6 ac 0f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 d8 05 c0 06 f6 ac 0f 00 00 00 00 00 00 00 00 00 00 00

The output is uniform, so I guess that's good. However I am not seeing anything that corresponds to ASCII characters. Any tips?

I am running Raspbian Stretch Lite release from 2017-11-29 and connect to it over ssh.

  • You could try to capture the output with an oscilloscope if you can get your hands on one. Also, what's the output like without using -H option? – LecauseAndThePi Jan 5 '18 at 10:17
0

As I know, the output of the LV-MaxSonar-EZ series is analog, however the Raspberry pi is unable to read analog data. So the solution is to use a analogue/digital decoder, I suggest the MCP 3008.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.