Counter for stepper

Hi everyone. I kinda need help here with some basic programming.

Basically i am going to use accelstepper library. and i am controlling two stepper motor at the same time.

The process is i want to run this two motor for 200 step/s for 10 second then 300 step/s for 20 second and continue onward.
Is it possible? i am still writing code, and can use some advise here since i am just a beginner in this type of field.

Thanks in advance.

void setup()
{
Serial.begin(9600);
Serial.setTimeout(10);
stepper1.setAcceleration(200);
stepper2.setAcceleration(1000);
stepper1.setMaxSpeed(200);
stepper2.setMaxSpeed(1000);
}

void loop()
{
stepper1.setSpeed(200);
stepper2.setSpeed(1000);
stepper1.moveTo(10000);
stepper2.moveTo(10000);

while ( stepper1.distanceToGo() != 0 || stepper2.distanceToGo() != 0)
{

stepper1.runSpeed();
stepper2.runSpeed();

}

i used this code however the speed is kinda weird.

First, you're not using the standard Stepper library, so we need to know what library you're using or, if you are writing those routines yourself, we need to see those. Second, you need to read the "how to use" post at the top of this Forum by Nick Gammon for the proper way to post code here using code tags. It will help us help you.

Please stop creating new Threads for the same project. I think this is the 4th one.

...R