Adjust speed of 2 stepper motors on Zero

I have to dynamically control the speed of 2 independent stepper motors. So, I need to adjust the frequency of 2 different PWMs which are stepping the motors. Can someone point me to some examples of how to adjust the frequency of 2 different PWMs?

thanks!

Stepper motors do NOT use PWM. They need a sequence of short “step” pulses and the interval between the pulses determines the speed of the motor.

Have a look at this Simple Stepper Code. The second example could be extended for 2 (or more) motors.

…R
Stepper Motor Basics