elegoo smart robot car - combining line tracking and obstacle avoidance

Well, you're going to have to do the donkey work, because you're the one with the hardware.

The delays have to go, or at best get a lot shorter.
No while loops.

A state machine is the usual approach here.

Please please i beg you to help me to make it work.

Post on the Gigs and Collaborations forum section. You may be asked to pay for the help.

protectorknight:
My codes are below. I combined both of line following and collision domain codes and i know it shouldn't be done like this. However, i do not have a clue to make it work properly. I want the codes to work so whatever track or formation the car is on, if there is object in front of the car, it will avoid the object and continue to resume moving along the track or formation. Please please i beg you to help me to make it work.

Begging isn't going to do it and neither is just restating what you want over and over again.

To have any chance of getting help you need to describe exactly what your code does now and what it doesn't do that you need it to. You're the one with the smart robot car so you need to do some serious testing and report back. We can't test it for you.

Steve

Well, i am sorry if i sound desperate. My teacher is on my ass. I thought coming my forum would give me some hope. But thanks for all for your input. "Real friendly and nice" to someone who is desperate for help. Thanks and sorry for wasting all your time.

My teacher is on my ass.

I wonder why.