 // speeds
 #define pulseWidth      5
 #define accelSteps     90
+#define decelDiff      10 // shorten decel to be sure of finding sensor
 #define halfTurnSteps 200 // steps for a half turn
 #define minPulse      500
 #define maxPulse     2500

        // avoid polling millis too often
        for (int i=0; i<10; i++) onestep(pulse);
    }
    for (int i=0; i<accelSteps; i++) {
        onestep(map(i, 0, accelSteps, pulse, startstoppulse));
    }
    if (recentre) findsensor(startstoppulse);

    for (int i=0; i<glisssteps; i++) {
        onestep(map(i, 0, glisssteps, startpulse, endpulse));
    }
    for (int i=0; i<(accelSteps - (decelDiff * recentre)); i++) {
        onestep(map(i, 0, accelSteps, endpulse, max(maxPulse, endpulse)));
    }
    if (recentre) findsensor(max(maxPulse, endpulse));
