         onestep(map(i, 0, decelsteps, endpulse, max(maxPulse, endpulse)));
     }
     if (recentre) findsensor(max(maxPulse, endpulse));
-    digitalWrite(LED_BUILTIN, LOW);
     return glissTime;
 }
 

    return (pitch / 2.0) + 36;
}

void flashled() {
    digitalWrite(LED_BUILTIN, HIGH);
    delay(100);
    digitalWrite(LED_BUILTIN, LOW);
    delay(100);
}

void onestep(unsigned long pulseTime) {
    digitalWrite(stepPin, HIGH);
    delayMicroseconds(pulseWidth);

    unsigned long startTime = millis();
    int pulse = pitchToPulse(pitch);
    int startstoppulse = max(maxPulse, pulse);
    digitalWrite(dirPin, dir);
    delayMicroseconds(pulseWidth);
    for (int i=0; i<accelSteps; i++) {
