Need help with elegoo robot car

A 12 year old built the car and I checked it, seems correctly assembled. Uploaded the basic sketches to make sure the wheels turned.

Adjusted the Avoidance sketch from the CD for a different Pin and uploaded successfully (attached)

The car moves forward - stops at a an obstacle - looks around - backups up a bit and then just sits there looking around.

Any suggestions would be appreciated.

Thanks.

Obstacle_Avoidance_CarR3.ino (3.08 KB)

If you have blueTooth modul and sonar, you can make:
this robot controlled via phone

this robot can detecting and going around the barrier