Timeline for Why I always see while(serial.available() > 0) as the standard way of reading serial data?
Current License: CC BY-SA 4.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 11, 2023 at 15:17 | answer | added | Nick Gammon♦ | timeline score: 1 | |
Dec 10, 2023 at 19:05 | comment | added | jsotola |
an if block would make more sense than a while block
|
|
Dec 10, 2023 at 16:18 | comment | added | Gianluca Ghettini | @DataFiddler fixed | |
Dec 10, 2023 at 16:17 | history | edited | Gianluca Ghettini | CC BY-SA 4.0 |
added 8 characters in body
|
Dec 10, 2023 at 16:08 | vote | accept | Gianluca Ghettini | ||
Dec 10, 2023 at 15:36 | comment | added | DataFiddler |
You're right. It depends on what else is done in the while block. BTW: byte is a data type in the Arduino environment, better don't use it as a variable name.
|
|
Dec 10, 2023 at 15:28 | answer | added | chrisl | timeline score: 4 | |
S Dec 10, 2023 at 14:59 | review | First questions | |||
Dec 10, 2023 at 16:10 | |||||
S Dec 10, 2023 at 14:59 | history | asked | Gianluca Ghettini | CC BY-SA 4.0 |