help with error code no matching function for call to 'AF_Stepper::step(int)'

im trying to control a stepper motor using the dk electronics shiled and a pot to slow it down or speed it up, not sure what the error means or what to do about it, ive googled the shiznit out of it but i cant find anything relative to it

heres the code.

/*
 Stepper Motor Control - speed control


 */

#include <AFMotor.h>

const int stepsPerRevolution = 200;  // change this to fit the number of steps per revolution
// for your motor


// Connect a stepper motor with 200 steps per revolution (1.8 degree)
// to motor port #2 (M3 and M4)
AF_Stepper motor(200, 2);

int stepCount = 0;  // number of steps the motor has taken

void setup() {
  
}

void loop() {
  // read the sensor value:
  int sensorReading = analogRead(A0);
  // map it to a range from 0 to 100:
  int motorSpeed = map(sensorReading, 0, 1023, 0, 100);
  // set the motor speed:
  if (motorSpeed > 0) {
    motor.setSpeed(motorSpeed);
    // step 1/100 of a revolution:
    motor.step(stepsPerRevolution / 100);
  }
}

the error is

no matching function for call to 'AF_Stepper::step(int)'
any help would be greatly appreciated.

Doesn't step take at least two arguments and sometimes three?

no idea, im a mechanical engineer mostly

If you look in AFMotor.h you'll find the 'send()' function's prototype:

void step(uint16_t steps, uint8_t dir,  uint8_t style = SINGLE);

So, it requires at least 2 arguments.

    // step 1/100 of a revolution:
    motor.step(stepsPerRevolution / 100);

What direction are you expecting the motor to move in ?
Try adding a second parameter of 0 or 1 to the function call.

Does it compile ?
Does the motor move ?
What happens if you change the second parameter from 0 to 1 or vice versa ?

If you look at File->Examples->Adafruit Motor Shield V2 Library->StepperTest you will see how to use many of the stepper features of the library.

thanks peeps i think ive sorted it now.

I'm having the same problem. What was your fix? Newbie here.
Thanks!