This is my first question on this platform.
I am making a prototype for a cheetah like robot, but I am running into a problem which I can’t seem to find an answer for on the internet.
I’ll try to explain myself as best as possible to avoid confusion and to avoid being an annoying newbie.
A PID control returns an (analog) output based on an error measured by the encoder on the motor. This output should drive the motor through a Adafruit motor shield V2. But this shield doesn’t work on analogwrite commands but rather on ‘‘run(FORWARD)’’ and ‘‘setSpeed(speed)’’ commands.
How can I run this configuration with the PID control?
Adafruit motor shield V2: Overview | Adafruit Motor Shield V2 | Adafruit Learning System
PID control: PID_V1 (standard library)
This is how I have to adres the motor:
Adafruit_MotorShield AFMS = Adafruit_MotorShield();
Adafruit_DCMotor *myMotor = AFMS.getMotor(1);
THANKS IN ADVANCE!
If I for got information to answer this question please let me know
If my question was to vague let me know and I will rephrase it