This video will show you both how to install it (if it is not installed in yours or you want to add a 2nd one) and how to program it. Mr. Patton will also talk about how ultrasonic sensors work to detect objects.
Use pin # 14 for “trig” Use pin #15 for “echo” Once you get your ultrasonic sensor working, have it moving forward and when the robot detects an object at about 15 cm, it should avoid it by changing direction.