This robot uses and ultrasonic range finder system with a servo motor which makes a radar system for the vehicle, every time servo moves left and right it stores the distance off left and right and compares which has a larger gap, according to that it moves left and right for details and source code you can whatsapp me at +91-9424278610 or mail me at tronix10technology@gmail.com