Go Down

Topic: Serial.end and SoftwareSerial.end - does it clear the character buffer? (Read 532 times) previous topic - next topic

jerseyguy1996

I have a need to start off with an empty character buffer so that subsequent calls to Serial.read only returns new information.  If I call Serial.end and then Serial.begin(4800) again, does that give me an empty character buffer?
Arduino Uno;
Mega328

codlink

//LiNK

jerseyguy1996


Code: [Select]
while(Serial.available()>0) Serial.read();


Thanks!  I have a follow up question but it is long so I will put it in its own thread under the Programming forum. 
Arduino Uno;
Mega328

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy