    
    //delay(g_moveDelay);
    
-   return checkPosition();
+   return ret_val;
 }
 
 // Moves the arm slowly to a new position, depending on the specified delay

   double uln_h = ULN_H_GRADIENT*g_uln_h.mean() + ULN_H_OFFSET;
   double uln_angle_d = degrees(  atan2(uln_h,uln_r) );
   DEBUG("uln_r: "); DEBUG(uln_r); DEBUG(", uln_h: "); DEBUG(uln_h); DEBUG(", uln_angle_d: "); DEBUGln(uln_angle_d);
   Serial.print("real angle = "); Serial.print(uln_angle_d); Serial.print(", desired angle = "); Serial.println( s + e );
   return ( abs(uln_angle_d - (s + e)) > FB_THRESHOLD ) ? -101 : 0;
}



void delayFunc ( long int delay_ )
{
  uint32_t start = micros();
  uint32_t count = 0;
  while ( micros() - start < delay_ )
  {
    if ( count % 5 == 0 ) getFeedback();
    count++;
  }
  
  /*int delay_ms = delay_/1000;
  int delay_us = delay_%1000;
  if ( delay_ms > 0 ) delay(delay_ms);
  if ( delay_us > 0 ) delayMicroseconds(delay_us);*/
  //Serial.println(count);
  //Serial.print(delay_); Serial.print("\t"); Serial.println(micros()-start);
  /*Serial.print(delay_ms);
  Serial.print("+");
  Serial.print(delay_us);
