pwm not changing duty cycle

I'm using a skid steer design for my two motor robot with wheels. I got some new motors , but changing the pwm does not seem to change the shaft speed of the motors; therefore the robot does not turn. Actually I should say that it turns very slowly. Almost so slowly that you can't tell it's turning. I'm using a mosfet for each wheel, and the motors have a separate 5v power supply (rechargeable aa batteries).

int motorPinL = 5;
int motorPinR = 6;

void setup() {
  pinMode(motorPinL, OUTPUT);
  pinMode(motorPinR, OUTPUT);
}

void loop() {
  analogWrite (motorPinR, 240);
  analogWrite (motorPinL, 200);
}

The only way to make it turn is to do this:

  analogWrite (motorPinR, 240);
  analogWrite (motorPinL, 1);

Any ideas?

You are probably using a decay mode, which coasts rather than braking. Which H-bridges and how are
they wired?

I'm not using H bridges. Just using a mosfet for each motor so it goes forward only. Also, using pwm to change direction worked fine with the old motors. The new motors are slightly different.

There's your problem. You have no braking at all.

I suspect your new motors are much better (less friction), thus they work worse for this!

yes, that makes sense for a lot of things now! Is there a work around from a coding standpoint without the H-bridges? Unfortunately I already had a few PCB's made.

The MOSFET can make the motor turn but cannot prevent external forces from turning it, it's either being driven or free wheeling.

TeslaIaint:
yes, that makes sense for a lot of things now! Is there a work around from a coding standpoint without the H-bridges? Unfortunately I already had a few PCB's made.

No, you have no braking in the circuit. You need at least 1/2 H-bridge circuit for active braking.