diff --git a/examples/CTCSS/CTCSS.ino b/examples/CTCSS/CTCSS.ino index efbe162..b881f3c 100644 --- a/examples/CTCSS/CTCSS.ino +++ b/examples/CTCSS/CTCSS.ino @@ -166,7 +166,7 @@ void loop() { } else { Serial.setTimeout(40); freq = Serial.parseInt(); - Serial.flush(); + while (Serial.available()) Serial.read(); radio.frequency(freq); Serial.print("set frequency: "); Serial.println(freq); diff --git a/examples/HandyTalkie/HandyTalkie.ino b/examples/HandyTalkie/HandyTalkie.ino index 96b53f6..b54761b 100644 --- a/examples/HandyTalkie/HandyTalkie.ino +++ b/examples/HandyTalkie/HandyTalkie.ino @@ -135,7 +135,7 @@ void loop() { } else { Serial.setTimeout(40); freq = Serial.parseInt(); - Serial.flush(); + while (Serial.available()) Serial.read(); radio.frequency(freq); Serial.print("set frequency: "); Serial.println(freq);