line follow code

can someone please help me with my line following code, i am using x3 photodiodes and x3 IR with two servo motors. in desperate need for help please

For a start post a diagram of how you have it all hooked up, then paste the code you have so far....

this is what ive started with. i know its easier to use if statements for when the diodes detect the black tape against the white background but im not sure how to actually write it.

#include <Servo.h>

Servo servoLeft;
Servo servoRight;
int pd0 = 1;
int pd1 = 0;
int pd2 = 2;

void setup() {
servoLeft.attach(10);
servoRight.attach(9);
pinMode(pd0, INPUT);
pinMode(pd1, INPUT);
pinMode(pd2, INPUT);
Serial.begin(9600);
}

jn.jpeg

Your code is incomplete - you need a "loop()" function as well as "setup()".

i know that, im just confused about putting the if statements with the values and making it read the sensors properly

console: i know that, im just confused about putting the if statements with the values and making it read the sensors properly

Well, what have you tried so far?

console: i know that, im just confused about putting the if statements with the values and making it read the sensors properly

It doesn't sound as if you have any idea where to start. Have you done any coding at all? There are plenty of example sketches that show you how to read switches and turn on lamps and motors that will give you an idea of what the code would look like.

If you're not going to make any serious attempt to do it yourself then you should be posting under Gigs and Collaborations.