problem with pwm

I need a code for two motor control by pwm on pro mini, Because I do not know use how the pwm.
Please help.

The "Fade" example that comes with the Arduino IDE shows how to use PWM.

The Arduino command to produce a PWM output is analogWrite(vvv) analogWrite(pin, vvv) where vvv is a number between 0 and 255 that defines the duty cycle.

There will also be information in the website Reference section.


Edit to correct error.

Actually analogWrite (pin, vvv)

Only some pins support PWM - on the Uno, Mini, Mini Pro etc the PWM pins
are 3, 5, 6, 9, 10, 11

Also some form of properly sized motor driver is usually required to interface the motor to a arduino pwm output pin.