Browse Source

Update v1.1

master
cs161079 5 years ago
parent
commit
0c6d78ab90
  1. 10
      autonomousCar/autonomousCar.ino

10
autonomousCar/autonomousCar.ino

@ -259,14 +259,15 @@ void park(int parkingNo) {
int row = (parkingNo / 2) + 1;
int side = (parking % 2) //If side is 1 then the parking is to right
// else if is 0 the parking is to left.
distance= getDistance(); //take the distance from ultrasonic sensor
while (row > 0) {
while (row > 1) {
absolute(255);
forward();
delay(FORWARD_STEP);
motor_stop();
r--;
row--;
}
//Check the side value to turn.
@ -279,10 +280,11 @@ void park(int parkingNo) {
delay(TURN_TIME);
motor_stop();
while(distance<10){
absolute(255);
forward();
delay(400);
}
motor_stop();
}

Loading…
Cancel
Save