Ping sensor + Servo Motor problem

Thanks

I tried it but still reading wrong values on serial screen. At the very beginning, for once I read the distance but then i start to read only "0-17-0-1-21-0" like this. Still it doesn't work.

By the way I also use sensor shield , can it cause problem?

PS: I deleted the return statements..