Hi I need some help to make my robot left the line and make a semi circle form and return to Follow the line How i can do that with may function motor to make this trajectory ...somenone have an example I use a Atmega 328 and arduino nano
This project on Hackster.IO may be helpful for you.
I can't help specifically, never having built either a line-follower or an obstacle avoider.
But it seems to me your program needs 2 "modes" which I guess could be handled as cases in switch...case, where line follower mode is the default.
If in line follow mode the obstacle avoider sensor triggers, switch to avoid mode, hang a left, and move forward with the left side slightly faster so as to veer to the right and try to get past the object while in the semi circle. All the while, keep reading the line sensors, and when they trigger go back to line mode.
But how will it know how "long" a semi circle to make to be sure it has passed the obstacle before heading back to the line?
Perhaps the course notes provided by your lecturer might give you a bit of a clue as to how to accomplish this?