Most of the recent mobile robot researchers focus on obstacle avoidance and path tracking in unknown environment. This paper presents a new algorithm using Straight-Line Equation adaptation mechanism that makes Robotino reaching its destination accurately, also to enable it to detect and to avoid static or dynamic obstacles using nine infrared sensors. A brief Robotino dynamic description is discussed to help in understanding the proposed control algorithm. A detailed algorithm design procedure is evaluated. The simulation results showed the effectiveness of the proposed algorithm in the sense of avoiding obstacles without collision through Robotino predefined path.