Commit 4076dbd9 authored by Toni Ruoss's avatar Toni Ruoss
Browse files

Uebung_4_Serial_Input

parent c1d84fde
......@@ -7,5 +7,11 @@ void setup() {
void loop() {
// put your main code here, to run repeatedly:
Serial.println("Hello World");
Serial.println("Wie ist dein Name?");
// Terminal-Input wird erst in nameString geschrieben, wenn die Eingabe mit Enter (\n) bestätigt wurde.
String nameString = Serial.readStringUntil('\n');
Serial.print("Hello ");
Serial.println(nameString); // nameString über Terminal ausgeben
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment