Stop multiple presses in vex bumper (Unexpected bumper output) According to Official documentation of the Vex Bumper, it states that the bumpers will cause:


  the robot sometimes [counts] a press twice. This issue is also caused by the robot counting too fast and as the limit switch is released, a second press is registered by the robot.


The documentation suggests this code:

task main() {
    while(true) {
         string presses = buttonPresses;
         if(presses != last) {
             writeDebugStreamLine(presses);
         }
         last = presses;

         if(SensorValue(bump) == 1) {
             wait1Msec(5);
             while(SensorValue(bump) == 1){}
             buttonPresses++;
         }
    }
}


However, if you are like me, this didn't work at all, multiple button presses were registered from holding down the button for a moment and releasing it.
Because this problem was so infuriating and strange, I managed to do a workaround which the program refused to take a sudden addition to button counts after taking a first one. This enabled me to use the button without multiple extra counts.

string last;
float buttonPresses = 0;
float time = time1[T1];
bool isFirstTime = true;

task main()
{
    ClearTimer(T1);
    clearDebugStream();
    while(SensorValue(go) != 1) {

        string presses = buttonPresses;
        if(presses != last) {
            writeDebugStreamLine(presses);
        }
        last = presses;

        if(SensorValue(bump) == 1 &amp;&amp; buttonPresses &lt; 6) {
            if(isFirstTime || time1[T1] - time &gt; 50) {
                isFirstTime = false;
                wait1Msec(15);
                while(SensorValue(bump) == 1){time = time1[T1];}
                buttonPresses++;
            }
        }

    }
}


If you want extra probability against multiple extra "presses" you can widen the interval of tolerance (in this case the 50 value) to something larger, but it makes it less accurate at registering quick taps.