motor driver

can anyone tell whats wrong with this with code?
basically im trying to move 2 motors but all it is does is move in clockwise direction(doing donut).
is there anything wrong with this code-

int motor_left = {6,5};
int motor_right = {8, 9};

void setup() {
Serial.begin(9600);

// Setup motors
int i;
for(i = 0; i < 2; i++){
pinMode(motor_left*, OUTPUT);*
pinMode(motor_right*, OUTPUT);
_
}_
_
}_
void loop() {
drive_forward();
delay(10);
//motor_stop();
drive_backward();
delay(10);
//motor_stop();
turn_left();
delay(10);
turn_right();
delay(10);
//motor_stop();
//motor_stop();
delay(1000);
//motor_stop();
_
}_
void motor_stop(){
digitalWrite(motor_left[0], LOW);
digitalWrite(motor_left[1], LOW);
digitalWrite(motor_right[0], LOW);
digitalWrite(motor_right[1], LOW);
delay(25);
_
}_
void drive_forward(){
digitalWrite(motor_left[0], HIGH);
digitalWrite(motor_left[1], LOW);
digitalWrite(motor_right[0], HIGH);
digitalWrite(motor_right[1], LOW);
_
}_
void drive_backward(){
digitalWrite(motor_left[0], LOW);
digitalWrite(motor_left[1], HIGH);
digitalWrite(motor_right[0], LOW);
digitalWrite(motor_right[1], HIGH);
_
}_
void turn_left(){
digitalWrite(motor_left[0], LOW);
digitalWrite(motor_left[1], HIGH);
digitalWrite(motor_right[0], HIGH);
digitalWrite(motor_right[1], LOW);
_
}_
void turn_right(){
digitalWrite(motor_left[0], HIGH);
digitalWrite(motor_left[1], LOW);
digitalWrite(motor_right[0], LOW);
digitalWrite(motor_right[1], HIGH);
_
}*_

It might be easier to help if you said what motor driver it is that you're trying to drive with this code.

Steve

delay(10);

How far can the motor move in 10 milliseconds?

It goes fwd for 10 ms, back for 10 ms, left for 10ms and right for 1010ms.

Please read the “hoe to use the forum” stickies to see how to format and post code.

You don’t give an array index number in your pin initialization. I am a bit surprised it does anything. I’ve never tried passing an array to pinMode()

try

for(i = 0; i < 2; i++){
pinMode(motor_left[i], OUTPUT);
pinMode(motor_right[i], OUTPUT);
}

Also please put code in a code block