Hi, I was looking for an intermediate/beginner level project so I made a line following robot using a motor shield, Two DC motors and QTR-8A Reflectance Sensor Array. This is my first time using the Arduino uno or any other arduino. I just finished building the robot and now i need help programming the robot, but the problem is I don't now how to, so does have I sample of code I could us as a guild line or any code I can use on my Robot that works so I can under stand it. ( I have installed the libraries needed for the sensors ( QTR-8A Reflectance Sensor) and the motors (AF motor)). I got All the wires hooked up for the sensor, and my DC motors are hooked up to the motor shield ( in pin M2 and M4). This project is a school project and it due within a week so any help will be appreciated Thank you.
Hi, I was looking for an intermediate/beginner level project so I made a line following robot using a motor shield, Two DC motors and QTR-8A Reflectance Sensor Array. This is my first time using the Arduino uno or any other arduino. I just finished building the robot and now i need help programming the robot, but the problem is I don't now how to, so does have I sample of code I could us as a guild line or any code I can use on my Robot that works so I can under stand it. ( I have installed the libraries needed for the sensors ( QTR-8A Reflectance Sensor) and the motors (AF motor)). I got All the wires hooked up for the sensor, and my DC motors are hooked up to the motor shield ( in pin M2 and M4). This project is a school project and it due within a week so any help will be appreciated Thank you.
I saw these two very similar posts, and to save anyone wasting their time, I merged them.
Try reading here
Thank you for informing me about that, but is there any way you can help me with my project ?
I'd probably start with a simple sketch to read and print the values of the individual line sensors.
Ignore the motors to begin with.
Shield and shade different sensors, and ensure that you see the results you expect.
To finish this project in a week is pretty optimistic for someone with no Arduino experience. It might be time to ask your teacher/professor or a classmate for help. Do you have any experience with any other microcontroller/programming language? Maybe it's best to try it with something with which you have experience. Hopefully you do have some programming experience and you'll be able to google around to find some line follower example code. Certainly, there is enough around. You can mix, match, and adapt those examples to your project.
You may not get all the help you think you need on forums when you say you're working on a school project due in a week. It implies that you have procrastinated and wish someone to write the code for you.
This could be your best bet: