Тёмный
No video :(

Easy Line Following Robot with Arduino! 

Fungineers
Подписаться 21 тыс.
Просмотров 48 тыс.
50% 1

Get your kit here:
www.banggood.c...
Get started with Arduino with this kit:
www.banggood.c...
Get your Arduino Uno ($3):
www.banggood.c...
Get your Arduino Nano ($1):
www.banggood.c...
You can get the L293D module here:
www.banggood.c...
This is a tutorial on how to build a line following robot using Arduino. The line followr robot is of different
configurations, so in this build, I teach how to make the simplest and the easiest line following robot.
This build uses the L293 Motor driver module shield to build the line follower robot, which makes it an easy build.
The coding and sketch for the line following Robot is also explained in detail.
Always wanted to learn how to make a line following robot with arduino? Interested in a DIY Project for arduino? This is the video for you!
If you liked this simple DIY Project, please subscribe to Fungineers for more DIY, Arduino, 3D printing projects.
Keep fungineering!

Опубликовано:

 

22 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 36   
@Fungineers
@Fungineers 6 лет назад
Heres' the code guys: #include AF_DCMotor motorA(4); //this is the left motor AF_DCMotor motorB(2); //this is the right motor void setup() { Serial.begin(9600); // set up Serial library at 9600 bps Serial.println("Line Follower Rover"); delay(500); pinMode(A0, INPUT); // declare A0 as input pin for left sensor pinMode(A1, INPUT); // declare A1 as input pin for right sensor motorA.setSpeed(180); // turn on motor1 motorA.run(RELEASE); motorB.setSpeed(180); // turn on motor2 motorB.run(RELEASE); } void loop() { int sensor1 = digitalRead(A1); int sensor2 = digitalRead(A0); //Reading the values of the sensors on the serial monitor Serial.print(sensor1); Serial.print(" "); Serial.println(sensor2); delay(50); //value of 0 means no black line, value of 1 means black line detected. //Move forward if both sensors zero (no black line). if ((sensor1 == 1) && (sensor2 == 1)) { motorA.setSpeed(200); // turn on motor1 motorB.setSpeed(200); motorA.run(FORWARD); motorB.run(FORWARD); } //Turn left if left sensor (sensor 1) detects black line else if ((sensor1 == 0) && (sensor2 == 1)) //motor1 is left motor, motor 2 is right motor { motorA.setSpeed(200); // turn on motor1 motorA.run(FORWARD); motorB.setSpeed(50); motorB.run(FORWARD); } //Turn right if right sensor detects black line else if ((sensor2 == 0) && (sensor1 == 1)) //motor1 is left motor, motor 2 is right motor { motorA.setSpeed(50); // turn on motor1 motorA.run(FORWARD); motorB.setSpeed(200); motorB.run(FORWARD); } }
@noohm2385
@noohm2385 5 лет назад
when i use the code it tells me afmotorh: no such file or directly plz help
@Fungineers
@Fungineers 5 лет назад
You have to add the afmotor library to your libraries folder
@noohm2385
@noohm2385 5 лет назад
where can i find afmotor library
@Fungineers
@Fungineers 5 лет назад
Google it man.
@itsakingsworld
@itsakingsworld 5 лет назад
Best answer ever......... You already gave the code what more do they want, for you to do it for them.
@alvinreyes8367
@alvinreyes8367 2 года назад
uhm, where are the double A batteries connected??? the 5v was the only one explained where to connect in the motor driver
@prateekgupta409
@prateekgupta409 4 года назад
Can u plz make videos on how to control a robot car by MEMS sensor??
@iconetsenterprise5362
@iconetsenterprise5362 2 года назад
How can i build a line following robot for multiple paths detection
@vibodhbhosure7760
@vibodhbhosure7760 5 лет назад
shows stray error
@vibodhbhosure7760
@vibodhbhosure7760 5 лет назад
Found the solution Soon will be uploading on my channel...
@edyy1662
@edyy1662 2 года назад
Can you make this project for 4 motors instead of 2? please
@helloworld9057
@helloworld9057 3 года назад
Hey! Im a beginner. I bought chasis the man there handed me chasis connected with 4 wheels and 4 DC motos now I don't understand the connection for 4 motors and code too. I m thinking to just get some wholes on any tough plastic at home and make my own? plz let me know about the connection else I can make a new chasis. Im confused.
@yassinemekaoui6089
@yassinemekaoui6089 4 года назад
how did you use two power supplies
@razu4291
@razu4291 2 года назад
How do you make a robot turn on a straight line ??
@STWNoman
@STWNoman Год назад
Perfect
@sanjukta.b2246
@sanjukta.b2246 4 года назад
How volt does it need
@techparistech2659
@techparistech2659 4 года назад
Good job
@iiiii6428
@iiiii6428 5 лет назад
Hi teacher i have a problem in my project please make a vedio about using l293d motor driver with fire sensor and servo.
@relaxingandrefreshingvideo801
@relaxingandrefreshingvideo801 5 лет назад
cn i use hiwat 9v battery of 20 rs
@amanranjan1746
@amanranjan1746 4 года назад
sir may you send me the link of the program
@lethario1874
@lethario1874 5 лет назад
Is it just me or does the "//" explanation not quite add up, because if your car steers to the right and you increase the speed of the left wheel and decrease the speed of the right wheel, won't the car keep steering to the right?
@Fungineers
@Fungineers 5 лет назад
Yeah
@lethario1874
@lethario1874 5 лет назад
@@Fungineers Thanks! This helps a lot for someone with zero knowledge about coding
@Fungineers
@Fungineers 5 лет назад
The right motor was bad. It spun slower than the left motor even when same voltage was applied. Thats the reason the car is always pulling to one side but the arduino is correcting it continously. So make sure you get good Motors :)
@nadunnimsath
@nadunnimsath 4 года назад
Your path is too wide bro
@towhidultonmoy3046
@towhidultonmoy3046 5 лет назад
I have a IR sensor array which has ports like, "VCC,GND,S1,S2,S3,S4,S5,CLP,Near". How can I connect it? I am facing problem in connection. Can you please help me out? Can I have your facebook ID or anything so that I can directly contact with you?
@Fungineers
@Fungineers 5 лет назад
You can conenct 5V to Vcc, ground to GND, and sensors to S1 S2,etc..
@casksteven3079
@casksteven3079 5 лет назад
can
@syaduinotech3681
@syaduinotech3681 3 года назад
Sir.. thanks for your videos. I got 1 questions if you can answer. 1) can we used different motor driver such as l29d instead of this?
@babali7588
@babali7588 3 года назад
I suppose you wanted the write l293d. The answer is yes you can use the l293d, l293b, l298n, or any other motor driver but you need to look datasheet for connection and code. Because codes are changing with components.
Далее
КТО ЛЮБИТ ГРИБЫ?? #shorts
00:24
Просмотров 1,1 млн
Never Troll Shelly🫡 | Brawl Stars
00:10
Просмотров 1,4 млн
I Tried To Beat Minecraft Backwards
18:53
Просмотров 1,4 млн
The Greenwich Meridian is in the wrong place
25:07
Просмотров 803 тыс.
What Happened To Google Search?
14:05
Просмотров 3,1 млн
I Built a Transparent Boomerang (it's lethal)
13:10
I Asked AI To Make Redstone For Me
11:16
Просмотров 7 млн
КТО ЛЮБИТ ГРИБЫ?? #shorts
00:24
Просмотров 1,1 млн