diff --git a/es/blatt3/uebung3-5/uebung3-5.ino b/es/blatt3/uebung3-5/uebung3-5.ino index 6eec18a..3a06805 100644 --- a/es/blatt3/uebung3-5/uebung3-5.ino +++ b/es/blatt3/uebung3-5/uebung3-5.ino @@ -90,8 +90,10 @@ void loop() { while (readable) { currentChar = Serial.read(); readable = (currentChar != -1); - command[i] = currentChar; - i++; + if (readable) { + command[i] = currentChar; + i++; + } } command[i] = '\0';