What steps will reproduce the problem?
1. Use `Serial.parseInt()` in a sketch.
2. Rather than blocking when no valid input is received a default value of zero
is returned.
3. Look at the documentation of `parseInt()` for mention of the
non-blocking/time out nature of the call.
What is the expected output? What do you see instead?
The description section of <http://arduino.cc/en/Serial/ParseInt> should
include the sentence: "If no valid integer is found within a certain elapsed
time (as set by Serial.setTimeout() with a default of one second) then a
default value (0) will be returned."
No mention of the time out is seen in the current documentation.
What version of the Arduino software are you using? On what operating
system? Which Arduino board are you using?
1.0.1 / NA / NA
Please provide any additional information below.
This change should also be made to:
<http://arduino.cc/en/Reference/StreamParseInt>
The documentation for `Serial.setTimeOut()`
<http://arduino.cc/en/Serial/SetTimeout> should probably mention the time out
affects the `parse*` group of methods as they use the `read*` group of methods.
Original issue reported on code.google.com by follower@gmail.com on 13 Oct 2012 at 6:42
Original issue reported on code.google.com by
follower@gmail.com
on 13 Oct 2012 at 6:42