 int reader;
 // Generally, you should use "unsigned long" for variables that hold time
 // The value will quickly become too large for an int to store
-unsigned long previousMillis = 0;        
-unsigned long previousMillisStappenmotor = 0;        
-
-const long interval = 20;           
-const long intervalStappenmotor = 10;   
+unsigned long previousMillis = 0;              
+
+const long interval = 10;           
 
 #define echoPin 5          // Echo Pin
 #define trigPin 4          // Trigger Pin

int coilb2 = 9;
int enable = 10;

int draainaarbeneden = 40;
int positie = 0;

int maximumRange = 200;                   // Maximum range needed

                case 7:
                  a1();
                  positie = 0;
                  draainaarboven--;
                  break;
              }
              
            }else if(draainaarbeneden>0){
              digitalWrite(enable, HIGH);
        
              switch(positie){
                case 0:
                  a1();
                  positie ++;
                  break;
                case 1:
                  b1Ena1();
                  positie++;
                  break;
                case 2:
                  b1();
                  positie++;
                  break;
                case 3:
                  a2Enb1();
                  positie++;
                  break;
                case 4:
                  a2();
                  positie++;
                  break;
                case 5:
                  b2Ena2();
                  positie++;
                  break;
                case 6:
                  b2();
                  positie++;
                  break;
                case 7:
                  a1Enb2();
                  positie = 0;
                  draainaarbeneden--;
                  break;
              }
              
            }
            else{
              digitalWrite(enable, LOW);
            }
        previousMillis = currentMillis;
     
    }
  }
   
}

void Distance(){ // meet de afstand van de sensor
 
  long duration, distance;                  // Duration used to calculate distance
  digitalWrite(timeOutPin, HIGH);
