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:
Arturo Guadalupi 2015-05-21 09:42:06 +02:00
parent 67b65ddd77
commit 4648330a7f
1 changed files with 1 additions and 0 deletions

View File

@ -28,6 +28,7 @@ void setup() {
}
void loop() {
serialEvent(); //call the function
// print the string when a newline arrives:
if (stringComplete) {
Serial.println(inputString);