Skip to content
Snippets Groups Projects
Commit 4076dbd9 authored by Toni Ruoss's avatar Toni Ruoss
Browse files

Uebung_4_Serial_Input

parent c1d84fde
Branches
No related tags found
No related merge requests found
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment