Timeline for How to avoid blocking while loop reading Serial?
Current License: CC BY-SA 3.0
7 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 24, 2020 at 21:48 | vote | accept | George Profenza | ||
| Jun 17, 2020 at 8:21 | history | edited | CommunityBot |
Commonmark migration
|
|
| Nov 17, 2017 at 12:28 | comment | added | dannyf | "Serial.read() is not blocking, it always returns immediately with a byte 0-255 or -1 if there is no character to read." unless it returns a multi-byte data type, it couldn't return 0-255 or -1 -> as -1 is 128. it likely returns 0-127 and -1 instead. | |
| Mar 31, 2015 at 1:33 | vote | accept | George Profenza | ||
| Oct 24, 2020 at 21:48 | |||||
| Mar 30, 2015 at 14:38 | comment | added | Wirewrap | Serial.read() reads from a 64 bytes buffer. If you can avoid filling up the buffer you will be okay. | |
| Mar 29, 2015 at 21:11 | comment | added | George Profenza |
Interesting indeed(+1). I will try to adapt the code without using available() and simply checking if Serial.read() > -1. Is there a change of missing a byte this way ?
|
|
| Mar 29, 2015 at 20:14 | history | answered | Wirewrap | CC BY-SA 3.0 |