Robot line follower and obstacle avoiding using 1 arduino uno, 1 L293D motor driver shield, 1 servo, 1 sensor ultrasonic, 2 sensor infrared, 2 button

@anwarmochtar Welcome to the forum..
Bots are fun.. :slight_smile:

Worked on one not too long ago, fraught with delays..
Taking them out usually requires developing a state machine or two..

Take a gander here.. run two loops at the same time..

compare original code to the code with delays removed..

Same principal can be applied you your code base..

have fun.. ~q