//node mcu code void setup() { // put your setup code here, to run once: Serial.begin(9600); } void loop() { // put your main code here, to run repeatedly: if(Serial.available()) { char a=Serial.read(); Serial.print(a); if(a=='\n')//meaning it is the next line { Serial.println(); } } }