diff --git a/autonomousCar/driver/driver.ino b/autonomousCar/driver.ino similarity index 98% rename from autonomousCar/driver/driver.ino rename to autonomousCar/driver.ino index 4d958ec..da088b4 100644 --- a/autonomousCar/driver/driver.ino +++ b/autonomousCar/driver.ino @@ -210,10 +210,12 @@ void loop() { // Prints the distance on the Serial Monitor //Serial.print("Distance: "); - //Serial.println(distance); + Serial.println(distance); + forward(); if (distance < 9){ motor_stop(); turn(); + delay(1500); forward(); } delay(500); diff --git a/stepMotor/step_motor.ino b/stepMotor/step_motor/step_motor.ino similarity index 94% rename from stepMotor/step_motor.ino rename to stepMotor/step_motor/step_motor.ino index 30f40d5..93d96e6 100644 --- a/stepMotor/step_motor.ino +++ b/stepMotor/step_motor/step_motor.ino @@ -27,7 +27,7 @@ const float STEPS_PER_OUT_REV = STEPS_PER_REV * GEAR_RED; // Number of Steps Required -const int stepper_motor_speed = 700; +const int stepper_motor_speed = 600; int pos = 1; const int StepsRequired = STEPS_PER_OUT_REV / 4; // Create Instance of Stepper Class @@ -36,7 +36,7 @@ const int StepsRequired = STEPS_PER_OUT_REV / 4; // Connected to ULN2003 Motor Driver In1, In2, In3, In4 // Pins entered in sequence 1-3-2-4 for proper step sequencing -Stepper steppermotor(STEPS_PER_REV, 6, 10, 11, 13); +Stepper steppermotor(STEPS_PER_REV, 6, 8, 12, 13); void setup() {