Need to kno how to add turnDelay in your code

If
(Sensor < dist)
motor2.run(FORWARD);
motor3.run(BACKWARD);
motor2.setSpeed(200);
motor3.setSpeed(200);

Where do you include the turnDelay and how do you word it??

Ummm, what the heck is turnDelay?

How about some background and maybe all the code.


Rob

if(Sensor < dist)
motor2.run(FORWARD);
motor3.run(BACKWARD);
motor2.setSpeed(200);
motor3.setSpeed(200);

In your example, the only conditionally-executed statement is "motor2.run(FORWARD);"
All the other statements will be executed, irrespective of the values of "Sensor" and "dist".
This may or may not be what you intended.

You'd have to post your code, and your specification to decide.