     //!  speed control
     delay(10000/(state->spd));
   }
+  indicate(false);
 }
 
 //!  @brief :  full stepping
 //!  @speed range:  [10,500]
 void full(const State* state)
 {
+  indicate(true);
   //!  specify the starting index according to the direction
   unsigned a,b,c,d;
   a = state->cw?  1  :  0;

    digitalWrite(pin, LOW);
    delayMicroseconds(period - duty);  
}

void half(const State* state);
void micr(const State* state);
void pwm(unsigned pin, unsigned period, unsigned duty);
void indicate(boolean running);

void setup() 
{                
  pinMode(A, OUTPUT);     
  pinMode(B, OUTPUT);     
  pinMode(C, OUTPUT);     
  pinMode(D, OUTPUT);

  pinMode(indicator, HIGH);    
}

void loop() 
