The principle of obstacle avoidance is the same as that of line following. A photoelectric pair tube is installed on the right side of the car body. When it detects an obstacle, the main control chip gives a signal alarm and controls the car to reverse and turn, so as to avoid the obstacle.