I added some lines to print out the current position. It counts up to 8152. Are you sure the code you modified was uploaded successfully? Try this version on your hardware. Does the motor stop before the position reaches 8152?
Are you sure your hardware is capable of 1000 steps per second? Try a lower number like 300 to see if the motor reaches the desired position.
// Include the AccelStepper Library
#include <AccelStepper.h>
// Creates an instance
// Pins entered in sequence IN1-IN3-IN2-IN4 for proper step sequence
AccelStepper myStepper(AccelStepper::FULL4WIRE, 4, 6, 5, 7);
void setup()
{
Serial.begin(115200);
// set the maximum speed, acceleration factor,
// initial speed and the target position
myStepper.setMaxSpeed(1000.0);
myStepper.setAcceleration(100.0);
myStepper.setSpeed(100.0);
myStepper.moveTo(4 * 2038ul);
// aqui serve para setar o numero de voltas que o motor
// vai dar, então no caso é melhor que marcar o tempo
// em minutos 1 volta=2038
}
void loop()
{
// Move the motor one step each time through loop()
myStepper.run();
Serial.println(myStepper.currentPosition());
}