Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serial3.setTimeout(...) is not expiring with the rx line always idle. #119

Open
MaurizioMalaspina opened this issue Mar 5, 2021 · 0 comments

Comments

@MaurizioMalaspina
Copy link

The following code never ends (it loops inside the " Serial3.readString() " ** when and only when the rx line is always HIGH** ('1' logic):

String rxReply;  

Serial3.begin(1200, SERIAL_8N1);

while(!Serial3);

Serial3.setTimeout(200); // 200 is just an example and if you print Serial3.getTimeout() you'll get the right result

rxReply = Serial3.readString();

// When the rx line stays high ('1' logic)  the execution never arrives here, as if the 200ms time-out never expired
// Conversely the code is properly executed when the rx line is low ('0' logic)

Serial.print(rxReply);

Could you take a look at this anomalous behaviour?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant