Last active
October 23, 2017 10:13
-
-
Save misternay/8abcc8a28625f6f9f2844f66f3cfcf04 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String name = ""; | |
void setup() { | |
Serial.begin(9600); | |
} | |
void loop() { | |
getText(); | |
if (name != "") { | |
Serial.println("HEllo: " + name); | |
name = ""; | |
} | |
} | |
void getText() { | |
while (Serial.available()) { | |
name = Serial.readString(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment