<commit_before>#include <Servo.h>
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;   

#define echoPin 5          // Echo Pin
#define trigPin 4          // Trigger Pin
#define timeOutPin A5       //De pin om de sensor aan en uit te doen

int maximumRange = 200;                   // Maximum range needed
int minimumRange = 0;                     // Minimum range needed


Servo myservo;

void setup(){
  myservo.attach(3);  // attaches the servo on pin 11 to the servo object
  Serial.begin(9600);
  reader = 0;

  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);
  pinMode(timeOutPin, OUTPUT);
}

void loop(){

  unsigned long currentMillis = millis();
  if (Serial.available() > 1) {
      reader = Serial.parseInt();
      delay(2);
  }
  
  if (reader == 0) { myservo.write(80);  delay(500); reader = -1; }
  else if (reader == 1) { myservo.write(60); delay(500); reader = -1;}
  else if (reader == 2) { myservo.write(100); delay(500); reader = -1; }
  else if (reader == 3) { myservo.write(0); delay(1000); reader = -1; }
  else if (reader == 4) { myservo.write(180); delay(1000); reader = -1; }
  else{
    
     if (currentMillis - previousMillis >= interval) {
        Distance();
        previousMillis = currentMillis;
     }
    }  
}
<commit_msg>pinnen toevevoegd voor stappenmotor<commit_after>#include <Servo.h>
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;   

#define echoPin 5          // Echo Pin
#define trigPin 4          // Trigger Pin
#define timeOutPin A5       //De pin om de sensor aan en uit te doen

int coila1 = 6;
int coila2 = 7;
int coilb1 = 8;
int coilb2 = 9;
int enable = 10;


int maximumRange = 200;                   // Maximum range needed
int minimumRange = 0;                     // Minimum range needed


Servo myservo;

void setup(){
  myservo.attach(3);  // attaches the servo on pin 11 to the servo object
  Serial.begin(9600);
  reader = 0;

  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);
  pinMode(timeOutPin, OUTPUT);
  pinMode(coila1, OUTPUT);
  pinMode(coila2, OUTPUT);
  pinMode(coilb1, OUTPUT);
  pinMode(coilb2, OUTPUT);
  pinMode(enable, OUTPUT);
}

void loop(){

  unsigned long currentMillis = millis();
  if (Serial.available() > 1) {
      reader = Serial.parseInt();
      delay(2);
  }
  
  if (reader == 0) { myservo.write(80);  delay(500); reader = -1; }
  else if (reader == 1) { myservo.write(60); delay(500); reader = -1;}
  else if (reader == 2) { myservo.write(100); delay(500); reader = -1; }
  else if (reader == 3) { myservo.write(0); delay(1000); reader = -1; }
  else if (reader == 4) { myservo.write(180); delay(1000); reader = -1; }
  else{
    
     if (currentMillis - previousMillis >= interval) {
        Distance();
        previousMillis = currentMillis;
     }
    }  
}

{'fraction_non_alphanumeric': 0.12212817412333736, 'fraction_numerical': 0.041112454655380895, 'mean_word_length': 2.7013422818791946, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '102517', 'n_tokens_mistral': 1178, 'n_tokens_neox': 1070, 'n_words': 350}