Closed GoogleCodeExporter closed 8 years ago
The behavior of Serial.flush() changed in Arduino 1.0, so this is expected.
Now it waits for outgoing characters to be sent, instead of dropping any
received characters.
Original comment by dmel...@gmail.com
on 17 Dec 2011 at 1:14
Ok, but my sketch only Rx data, and due to hardware conexions i can't Tx
anything.
And i need clear the buffer Rx.
Solution with v1.0:
while(Serial.available()>0) Serial.read();
Original comment by txu...@gmail.com
on 17 Dec 2011 at 1:51
Actual (21/12/2011) Copy&Paste from: http://arduino.cc/en/Serial/Flush
Flushes the buffer of incoming serial data. Any call to Serial.read() or
Serial.available() will return only data received after all the most recent
call to Serial.flush().
Serial.flush() waits for outgoing data to transmit before clearing the buffer
contents.
Original comment by txu...@gmail.com
on 21 Dec 2011 at 5:00
Original issue reported on code.google.com by
txu...@gmail.com
on 2 Dec 2011 at 12:51