Browse Source

Update Autonomous Car v1.3

master
Evangelos Oulis 5 years ago
parent
commit
6cae23e4ee
  1. 11
      autonomousCar/autonomousCar.ino

11
autonomousCar/autonomousCar.ino

@ -293,26 +293,21 @@ void park(int parkingNo) {
int Serial_Input() int Serial_Input()
{ {
int number; int number;
<<<<<<< HEAD
while (!Serial.available()) ;
=======
Serial.flush(); Serial.flush();
while(!Serial.available()) ; while(!Serial.available()) ;
>>>>>>> dce72c29be70c5124af0193dc8a435a5deb10bfb
if (Serial.available() > 0) { if (Serial.available() > 0) {
number = Serial.parseInt(); number = Serial.parseInt();
while (number <= 0) { while (number <= 0) {
// convert the incoming byte to a char and add it to the string: // convert the incoming byte to a char and add it to the string:
number = Serial.parseInt(); number = Serial.parseInt();
}
// if you get a newline, print the string, then the string's value:
Serial.print("Value:"); Serial.print("Value:");
Serial.println(number); Serial.println(number);
// clear the string for new input: // clear the string for new input:
} }
// if you get a newline, print the string, then the string's value:
}
return number; return number;
} }

Loading…
Cancel
Save