First of all I want to say I am new in Arduino and C.
I have the below code to read the UART input, but, I want to go out of the "While" loop if not receive data within 2 seconds. I know that we can use "millis" and another "while loop", or another solution that I am not seeing now, but, I do not know how to do it.
Can you please help me. thanks, Manuel
while(!Serial.available()) ;// Do nothing until there is something to read received_byte = Serial.read();