raschemmel:
Have you researched H-BRIDGE to understand how one works ?
The answer to your question is in understanding how an H-Bridge works. The only reason it exists is to be able to reverse the direction of the motor. (PWM control can be done with a single switching device).
If IN1 = LOW , and IN2= HIGH,
direction = one direction
IN2 = HIGH, IN1 = LOW,
direction = OTHER direction.
Get it ?
Hi , thanks . I'll try that .
JimboZA:
You also need to HIGH the ENable pin for each motor to get it going, not just hi/lo or lo/hi on the IN pins.
Normal practice is also to use the EN as PWM if you want speed control.
You need to be aware of the L298 chip on there being a voltage hog.... it loses 2V under all circumstances, up to almost 5V at high current. So you need to budget for that on your power supply.
Hi , thanks . I'll give higher voltage . However the motors I have are rated for 12v but they even work at 1.5v 
ChilliTronix:
Have you got a motor to hand or if not a multi meter?
If either then surely you can test by powering it up and taking each input either high or low.
Hi , I'll also try that , thanks .
But I don't understand what should I do if I wanted to test a stepper (I only use this driver for testing) . I've seen a sample code :
int ENA=2;//connected to Arduino's port 2
int IN1=3;//connected to Arduino's port 3
int IN2=4;//connected to Arduino's port 4
int ENB=5;//connected to Arduino's port 5
int IN3=6;//connected to Arduino's port 6
int IN4=7;//connected to Arduino's port 7
int _step = 0;
boolean dir = false; //gre
void setup()
{
pinMode(ENA,OUTPUT);
pinMode(ENB,OUTPUT);
pinMode(IN1,OUTPUT);
pinMode(IN2,OUTPUT);
pinMode(IN3,OUTPUT);
pinMode(IN4,OUTPUT);
digitalWrite(ENA,HIGH);//enable motorA
digitalWrite(ENB,HIGH);//enable motorB
}
void loop()
{
switch(_step){
case 0:
digitalWrite(IN1, LOW);
digitalWrite(IN2, LOW);
digitalWrite(IN3, LOW);
digitalWrite(IN4, HIGH);
break;
case 1:
digitalWrite(IN1, LOW);
digitalWrite(IN2, LOW);
digitalWrite(IN3, HIGH);
digitalWrite(IN4, HIGH);
break;
case 2:
digitalWrite(IN1, LOW);
digitalWrite(IN2, LOW);
digitalWrite(IN3, HIGH);
digitalWrite(IN4, LOW);
break;
case 3:
digitalWrite(IN1, LOW);
digitalWrite(IN2, HIGH);
digitalWrite(IN3, HIGH);
digitalWrite(IN4, LOW);
break;
case 4:
digitalWrite(IN1, LOW);
digitalWrite(IN2, HIGH);
digitalWrite(IN3, LOW);
digitalWrite(IN4, LOW);
break;
case 5:
digitalWrite(IN1, HIGH);
digitalWrite(IN2, HIGH);
digitalWrite(IN3, LOW);
digitalWrite(IN4, LOW);
break;
case 6:
digitalWrite(IN1, HIGH);
digitalWrite(IN2, LOW);
digitalWrite(IN3, LOW);
digitalWrite(IN4, LOW);
break;
case 7:
digitalWrite(IN1, HIGH);
digitalWrite(IN2, LOW);
digitalWrite(IN3, LOW);
digitalWrite(IN4, HIGH);
break;
default:
digitalWrite(IN1, LOW);
digitalWrite(IN2, LOW);
digitalWrite(IN3, LOW);
digitalWrite(IN4, LOW);
break;
}
if(dir){
_step++;
}
else{
_step--;
}
if(_step>7){
_step=0;
}
if(_step<0){
_step=7;
}
delay(10);
}
which is for a similar driver , but I guess it would work with this too ? (both are L298Ns and similar circuit)