-->
Page 1 of 1

Issue using Serial.readStringUntil

PostPosted: Sun Jun 12, 2016 7:01 pm
by Asaf Matan
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
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);
}


Re: Issue using Serial.readStringUntil

PostPosted: Tue Jun 14, 2016 4:59 am
by Asaf Matan
Ok I have found what made the difference, if I put OLED display (Adafruit 128X32 feather wing/spi mode) init before the serial env variables read serial wont work.

Regards
Asaf