FundoMoto L298 Motor Driver Board Questions

I have started using this shield but I’m confused on a number of issues. Hopefully, someone more knowledgeable can help me. My questions are:

  1. How does the board control motor speed? Is it by switching the output on and off with a varying duty cycle - I see multiple refences in the documentation to PWM but it isn’t clear how this works.
    With this code

int E1 = 10;
int M1 = 12;

digitalWrite(M1,HIGH); // DIRECTION

analogWrite(E1, 100); // speed

the motor A will run “forward” at an intermediate speed (0= stopped, 255 = maximum)

So that means pin D10 is being cycled high and low to produce the PWM output??

  1. What inputs are available for me to connect to switches, track sensors etc?

Thanks in advance

Pwm tutorial

Steve

Thanks Steve

ronb1949:
2. What inputs are available for me to connect to switches, track sensors etc?

That's the problem with shields: not easy to be 100% sure what pins it uses and what's available.

But is there no datasheet or schematic from the manufacturer / vendor?