L298n only one direction

I connected a 12v motor to my Arduino Nano via an L298n. In1 is on d2 and in2 is on d3. The problem is nothing happens, the light on the l298n that indicates whether a signal is being sent flashes. As soon as I pull out in2 it only works in one direction. When only in2 is connected still nothin happens. The motor works and the parts work without problem
code:

#include <L298N.h>
const unsigned int IN1 = 2;
const unsigned int IN2 = 3;
L298N motor(IN1, IN2);

void setup() {
  
}
  

void loop() {
  motor.forward();
  delay(2000);
  motor.backward();
  delay(2000);
}

i hope that helps

Wiring, schematics please....

1 Like

edited sry

Where is the ground connection between the L289N module and the Arduino?

1 Like

the ground of the l298n goes to the

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.