I am trying to make a bluetooth controlled car using an arduino uno and a L289N motor driver with 12 v supply. both motors are rotating fine while both are moving in same direction but gets slow while moving in opposite direction
Except that we can't tell what m1, m2, b1, and b2 are as far as the 298 is concerned, although presumably they are the motor direction pins IN1, IN2, IN3 and IN4 pins nor can we see the other connections to the 298 like the motor power Vs and logic power Vss. What about ENA and ENB?
Post a schematic. If you have a 298-based board or shield, as opposed to a loose 298, say so and give details.
But that all said, you need a high/low pair to drive a motor.
So m1 and m2 high, if they are the 2 connections to the same motor (I don't know) makes no sense. If they are one side of each motor, then you need to make the other sides low surely, presumably the b1 and b2.
Hence the request for details of what m1, m2, b1 and b2 are, with respect to the 298.
I have not connected the ENA and ENB pins (as i am not willing to control the speed:) ) 12 v battery is connected to supply pin(12v) provided by common ground connection. and my connections are working fine except when motors are rotating in opposite directions.