L298N MOTER DRIVER PROBLEMS

I have a L298N moter driver that is not working

When i hook up a dc moter

the moter goes really fast and then slowly slows down and it shouldn't
Why is it doing this

This is my code

void setup() {
 pinMode(7,OUTPUT);
 pinMode(8,OUTPUT);
 pinMode(10,OUTPUT);
}

void loop() {
  digitalWrite(8,HIGH);
  digitalWrite(7,LOW);
  digitalWrite(10,200);
}
 digitalWrite(10,200);

200 is as good as HIGH to a digitalWrite.

the moter goes really fast and then slowly slows down . . .
Why is it doing this

The motor is overheating?
The battery is running flat?

the moter is not overheating
i tried 6 aa batteryies and still does not work
moters with a orange circle thing that says 104 on it, just keeps going the same speed even when i adjust the PWM number in the sketch.

just keeps going the same speed even when i adjust the PWM number in the sketch.

Did you change to use the correct function, analogWrite()?

thank you Paul S. you are a hero

so it looks like it dosnt work when i dont put a orange thing that says 104 on the moter.
this is probably normal?

so it looks like it dosnt work when i dont put a orange thing that says 104 on the moter.

Is that "orange thing that says 104" a capacitor?

Ya i am pretty sure

here is pic

https://www.google.ca/search?q=104+capacitor&biw=1366&bih=643&source=lnms&tbm=isch&sa=X&ved=0ahUKEwiz8-yNmPPMAhXk6YMKHW4cCrIQ_AUIBigB#imgrc=xlXmnXIzoEDzuM%3A