hi,I m new in arduino programming and I m trying to get two stepper motors to rotate at the same time. I m using two UCN5860 drivers IC'S and an Arduino Mega 2560.to arduino pins dir=8,Step=6 for the stepper 1 and pins pins dir=9,Step=7 for the stepper 2. when i run the program (shown below) no one steppers rotate 
i want to control the position of both steppers in such a way that when entering command through serial monitor of arduino then compares input char if it is "a" then move both steppers at the same time to 90 degree then after some delay reverse to its initial position i.e: 0 degree....in the same manner if it is "b" then move both steppers at the same time to 180 degree then after some delay reverse to its initial position i.e: 0 degree..
please give me some advise so that i can run the following code:
please help 
#define STP 6
#define DIR 8
#define STP1 7
#define DIR1 9
void applyBrakes()
{
digitalWrite(DIR, LOW);
digitalWrite(STP, LOW);
digitalWrite(DIR1, LOW);
digitalWrite(STP1, LOW);
delayMicroseconds(50);
}
void stepper1Forward()
{
digitalWrite(DIR, HIGH);
digitalWrite(STP, HIGH);
delayMicroseconds(2); //
digitalWrite(STP, LOW);
delayMicroseconds(100);
}
void stepper1Reverse()
{
digitalWrite(DIR, LOW);
digitalWrite(STP, HIGH);
delayMicroseconds(2);
digitalWrite(STP, LOW);
delayMicroseconds(100);
}
/**
- Rotate stepper 1 forward by 1 step
*/
void stepper2Forward()
{
digitalWrite(DIR1, HIGH);
digitalWrite(STP1, HIGH);
delayMicroseconds(2); //
digitalWrite(STP1, LOW);
delayMicroseconds(100);
}
void stepper2Reverse()
{
digitalWrite(DIR1, LOW);
digitalWrite(STP1, HIGH);
delayMicroseconds(2);
digitalWrite(STP1, LOW);
delayMicroseconds(100);
}
void setup()
{
pinMode(DIR, OUTPUT);
pinMode(STP, OUTPUT);
pinMode(DIR1, OUTPUT);
pinMode(STP1, OUTPUT);
}
void loop()
{
if(Serial.available() > 0)
{
char character = (char) Serial.read();
if(character == 'a') //90
{
for(int i = 0; i <50 ; i++)
{
stepper1Forward();
}delay( 10 );
for(int i = 0; i <50 ; i++)
{
stepper2Forward();
}delay( 10 );
for(int i = 0; i <50 ; i++)
{
stepper1Reverse();
}delay( 10 );
for(int i = 0; i <50 ; i++)
{
stepper2Reverse();
}delay( 10 );
void applyBrakes();
}
else if(character == 'b') //180
{ for(int i = 0; i <100 ; i++)
{
stepper1Forward();
}delay( 10 );
for(int i = 0; i <100 ; i++)
{
stepper2Forward();
}delay( 10 );
for(int i = 0; i <100 ; i++)
{
stepper1Reverse();
}delay( 10 );
for(int i = 0; i <100 ; i++)
{
stepper2Reverse();
}delay( 10 );
void applyBrakes();
}
}