LN298N Motor Driver Fails to Drive Two DC Motors

Yeah, I understand that it has a 1.8v drop. But I've seen people run two motors with them. I'm using a standard 6v power supply (4 Double-A). Both motors work when turned on individually. However, when I try running both motors, they make a hum. What are my solutions? Do I ditch the LN298N?

Project details:

Arduino Uno
LN298N
Two generic geared dc motors with yellow covering
6v battery pack

Do you have a meter to check the voltage at the motor terminals while it's humming? My guess is the L298 can't pass enough current at the lower voltage (maybe drained batteries?) to spin both motors.

I'm getting .05 volts on both the screw terminals.

int enA = 11;
int in1 = 8;
int in2 = 7;

int enB = 6;
int in3 = 5;
int in4 = 4;

void setup()
{
  pinMode(enA, OUTPUT);
  pinMode(enB, OUTPUT);
  pinMode(in1, OUTPUT);
  pinMode(in2, OUTPUT);
  pinMode(in3, OUTPUT);
  pinMode(in4, OUTPUT);
}
void forward(){

  digitalWrite(in1, HIGH);
  digitalWrite(in2, LOW);
  analogWrite(enA, 255);

  digitalWrite(in3, HIGH);
  digitalWrite(in4, LOW);
  analogWrite(enB, 255);
  
}

void loop(){
  
  delay(1);
  
  forward();
  delay(1000);
}

Could it be my code?

The L298 is ancient technology and the chip has a large internal voltage drop (up to 4 V!).

You would be much better off with modern motor drivers like those from Pololu.

Measure the stall current for those motors before choosing.

Either lock the shaft and use your multimeter to measure the current draw with 3 volts power applied, then multiply by (motor power supply voltage)/3, or, measure the winding resistance and divide that into the motor power supply voltage.

Any cheaper alternatives? Pololu will leave a gap in my wallet.

Hmmm! I think you need more and bigger:
Driver board.
Power supply.
As JR said, check your motors' voltage and stall current requirements before buying anything.

What is your motors rated voltage?
With the motor disconnected, check the winding resistance by:
1 Put your Ohmmeter across the terminals and read.
2 Turn the shaft a small amount.
3 repeat steps 1 and 2 twice more, take the lowest reading and divide the rated voltage by that.
That should be close to stall current.

Motors are rated for 3 volts. I tried changing the batteries, both motors running. Still considering a different motor driver, however.

Any cheaper alternatives?

You can always take a chance on eBay or Alibaba -- little to no documentation, no technical support, the board may not even work, etc.

Pololu engineers document their products very thoroughly and really stand by them, even to the point of weekend technical support on the forum.