Issue using Serial.readStringUntil
Posted: Sun Jun 12, 2016 7:01 pm
Hi There.
I am using Adafruit feather huzzah esp8266 module for some nice project,
Among other things I need to get environment variables from a Windows PC and store them later in EEPROM (Like SSID and other stuff)
I can write easily to the debug monitor window, but have difficulties to read back data using Serial.readString/Serial.readStringUntil?
Can you please let me know what should I check/take care in order to read serial data?
Regards
Asaf
I am using Adafruit feather huzzah esp8266 module for some nice project,
Among other things I need to get environment variables from a Windows PC and store them later in EEPROM (Like SSID and other stuff)
I can write easily to the debug monitor window, but have difficulties to read back data using Serial.readString/Serial.readStringUntil?
Can you please let me know what should I check/take care in order to read serial data?
Regards
Asaf
Code: Select all
#include <ESP8266WiFi.h>
void setup() {
String str;
Serial.begin(115200);
Serial.println("Hello");
Serial.setTimeout(30000); // 30 Sec time out
Serial.print(F("Enter SSID:"));
str = Serial.readString();
Serial.println(str);
Serial.print(F("Setup End"));
}
void loop() {
delay(5000);
}