/* aufgabeL1-4_zusatz.ino
 *  Handreichungen Wahlfach BPE 10 Robotik
*/ 


#include "motormovement.h"


//before execute loop() function,
//setup() function will execute first and only execute once
void setup() {
  Serial.begin(9600);//open serial and set the baudrate
  pinMode(IN1, OUTPUT); //before useing io pin, pin mode must be set first
  pinMode(IN2, OUTPUT);
  pinMode(IN3, OUTPUT);
  pinMode(IN4, OUTPUT);
  pinMode(ENA, OUTPUT);
  pinMode(ENB, OUTPUT);
}

//Repeat execution
void loop() {
  for (int i = 0; i < 2; i++) {
    for (int j = 0; j < 4; j++) {
      forward();
      setSpeed(140);
      delay(1000);
      right();
      setSpeed(150);
      delay(950);
    }
  }
  stop();
  exit(0);
}
