jremington:
This post appeared on the Sparkfun forum as well, and the OP clearly has not bothered to read the data sheet for the sensor. Which, incidentally, has very detailed operating instructions.The code posted was obviously intended for a ping sensor.
Wire.write(myChar); // command sensor to measure in "inches" (0x50)What a waste of everyone's time!
MyChar was declared in the code as 'R' to read from sensor as I understood from the datasheet (forget about the comments) .
I have used other codes after that and lastly used software serial code, but it still did not work. can you please suggest the way forward since you seem to understand the problem well enough. Would be very thankful to you.