Reading serial data from maxSonar ultrasonic rangefinder

A couple of days ago, I was helping a user with support for this topic (remember I work for MaxBotix), and I noticed that by default when reading the 1mm resolution from the MB1013 if the target was under 1 meter in distance, the Arduino would only read 3 numbers. As soon as the target was further than 1 meter, the Arduino would output all 4 numbers.

Attached is the code that I gave this end user for support with this topic.

The information given, is from my personal experience and does not represent MaxBotix Inc. in any way.

TTL_ArduinoCode_Parsing.ino (2.47 KB)