mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-01 12:24:14 +01:00
Fix for serialEvent example
In the example is stated that the function is run between one loop and the next, but actually the call to the function was missing. The comment also state that the response can be delayed using a delay in the loop,so I think that the way it should be is so by only adding a call to the function serialEvent as first operation in the loop. I so added this call.
This commit is contained in:
parent
67b65ddd77
commit
4648330a7f
@ -28,6 +28,7 @@ void setup() {
|
||||
}
|
||||
|
||||
void loop() {
|
||||
serialEvent(); //call the function
|
||||
// print the string when a newline arrives:
|
||||
if (stringComplete) {
|
||||
Serial.println(inputString);
|
||||
|
Loading…
Reference in New Issue
Block a user