Using Ultrasonic Sensor

We are interested in any information about how a team may have used the MaxSonar on your 2012 robot?
We are working with sensors over the summer and program in LabVIEW, but can understand some equivalent C code.
We were hoping to use the sonar to backup to a fixed object about 5" away, but the sonar does not seem to update in real time for us and when testing the sensor on the bot, it varies wildly in accuracy.
Off the bot outside of 6" we seem to have repeatability within an inch. Actually the farther away we get, the more accurate it seems to be. We would appreciate any feedback. Thanks.
Addition, okay, I read the spec sheet and it’s not supposed to work closer than 6". So that’s working the way it is supposed to. Would still appreciate any info about how the sensor was used by other teams.

Look her for the data sheet for the sonar that came in the kit of parts. http://www.maxbotix.com/documents/MB1010_Datasheet.pdf

You can see that it says

“The LV-MaxSonar®-EZ1™ detects objects from 0-inches to 254-inches (6.45-meters) and provides sonar range information from 6-inches out to 254-inches with 1-inch resolution. Objects from 0-inches to 6-inches range as 6-inches”

We used the sensor in 2011 to range our selves to the post and to the side wall of the alley. They worked very well because we could know for certain what we were ranging against. We just used the analog inputs for both of the sensors that we used.