servo code interfering with second potentiometer

I’m sure it’s a simple fix or else I would have seen this all over the place. I basically chopped and pasted the first servor project and the first h-bridge projects together but my motor only reacts to “wide open” on the potentiometer.

I’ve narrowed it down to the following bits of code:

#include<Servo.h>
Servo myServo;

and

 myServo.attach(10);
  
  Serial.begin(9600);

When I DONT include these, I dont have any problems adjusting the motor speed with the associated potentiometer. When I DO, it only gives me “wide open throttle”

is there something in this library that I’m not understanding? Thanks for the help guys

-Gabe

Read the documentation for the Servo library carefully. The servo library takes over use of a hardware timer which the Arduino runtime uses to provide PWM output on certain pins. As a result, using the Servo library disables PWM output on the affected pins - even if you have not attached a servo to those pins. Unfortunately the affected pins are ones that some motor driver shields use for PWM speed control.