Question: Please write code for an obstacle avoiding robot and line follower that uses Arduino uno , , components l 2 9 8 n motor driver,

Please write code for an obstacle avoiding robot and line follower that uses Arduino uno ,, components l298n motor driver, ultrasonic sensors and servo motor to turn the ultra sonic to see left and right in case detected an obstacle while it was moving in the black line and stops if it get out the black line and it shall avoid the obstacle and get back to the black line , and two IR sensors detect the black line .(i wrote a code but the ir sensor dont detect the black line properly and it dont detect the obstacle also when it see obstacle it should xheck let and right which way is empty take it and avoid the obstacle and get back to the black line again .
int enA =10;
int in1=9;
int in2=8;int enB =5;int in3=7;
Int in4=6;#define L_S A0//ir sensor Left
#define R_S A1//ir sensor Right
#define echo 3//Echo pin
#define trigger 2//Trigger pin#define servo 11

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!