From 6cae23e4eeddcdfcc8a558241aeb46b4de0153df Mon Sep 17 00:00:00 2001 From: Evangelos Oulis Date: Tue, 21 Jan 2020 19:56:39 +0200 Subject: [PATCH] Update Autonomous Car v1.3 --- autonomousCar/autonomousCar.ino | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/autonomousCar/autonomousCar.ino b/autonomousCar/autonomousCar.ino index a9790d9..0e33bd9 100644 --- a/autonomousCar/autonomousCar.ino +++ b/autonomousCar/autonomousCar.ino @@ -293,25 +293,20 @@ void park(int parkingNo) { int Serial_Input() { int number; -<<<<<<< HEAD - while (!Serial.available()) ; -======= + Serial.flush(); while(!Serial.available()) ; ->>>>>>> dce72c29be70c5124af0193dc8a435a5deb10bfb if (Serial.available() > 0) { number = Serial.parseInt(); while (number <= 0) { // convert the incoming byte to a char and add it to the string: number = Serial.parseInt(); + Serial.print("Value:"); + Serial.println(number); + // clear the string for new input: } - // if you get a newline, print the string, then the string's value: - - Serial.print("Value:"); - Serial.println(number); - // clear the string for new input: } return number;