 // (r = radius, h = height, b = azimuth = base servo angle, handAngle = angle of hand from horizontal)
 int moveArmCoord( double radius_mm, double height_mm, double basAngle_d, double handAngle_d )
 {
+   if ( radius_mm < 0 ) return -4;
    DEBUG("moveArmCoord("); DEBUG(radius_mm); DEBUG(","); DEBUG(height_mm); DEBUG(","); DEBUG(basAngle_d); DEBUGln(")");
    /* Lengths from shoulder to wrist in cylindrical coordinates */
    double s2w_h = height_mm - BASE_HEIGHT - HAND*sin( radians( handAngle_d) );

            else Serial.println(ret_val);
            break;
         case 'R':
            moveArm(BAS_PARK,SHL_PARK,ELB_PARK,WRI_PARK); Serial.println("ARM PARKED!"); break;
            
         case 'l': //start of setting light PWM value
            i=0; buf[i] = Serial.read(); delay(1);

   if ( ( ret_val = servoWritePulse( ELB, elbPulse ) ) != 0 ) return ret_val;
   if ( ( ret_val = servoWritePulse( WRI, wriPulse ) ) != 0 ) return ret_val;
   
   //delay(g_moveDelay);
   
   return ret_val;
}
