ultrasonic sensors works fine until i merge codes into it

Why not use the NewPing library found at: Arduino Playground - NewPing Library ?