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.