Arduino Uno doesn't control L298N

Hello,
I have problems controlling a L298N with an Arduino Uno. (+ 12-V motor and power supply)

When I try this, the motor works fine:

When I connect it to an Arduino and set the pin 7 high, it doesn't work, although with a multimeter I made sure, that there is 5V at Pin 7.

const int IN1=7;
const int IN2=8;

void setup() 
{
  pinMode(IN1,OUTPUT);
  pinMode(IN2,OUTPUT);
  digitalWrite(IN1,HIGH);
  digitalWrite(IN2,LOW);

}

void loop() 
{
 
  }

I tried 5 different L298N and two different Arduinos.
Does someone have an advice?
Greetings, Tom

Do you have a common Gnd for all 3 devices?

CrossRoads:
Do you have a common Gnd for all 3 devices?

The Arduino is powered by my PC, not by the 5V Output of the L298N if that's what you mean.

So do the Arduino, the L298 board, and the 12V supply all have their Gnd's connected? The drawing doesn't show that.

Connect grounds.

groundFungus:
Connect grounds.

Oops, yes I get it know, why that was the problem. Thank you both.

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