[Solved] After "Serial.begin" ESP8266 doesn't respond
Posted: Sat Jan 02, 2016 3:03 pm
Just got my ESP8266 and I can successfully talk with it in the Serial Monitor with a Arduino uno r3. I have connected it to a network and it seems to be stable. I haven't done anything with the firmware (AT version:0.25.0.0 and SDK version:1.1.1). I can only talk with it over baud rate 115200. When I was going to start to write my project I found out that as soon the Arduino reads "Serial.begin(115200)" the ESP8266 doesn't respond anymore.
Do I have to use any library to be able to talk with the ESP8266 through a sketch? I've seen several guides without any libraries. Or have I just missed something important to get it to work
Do I have to use any library to be able to talk with the ESP8266 through a sketch? I've seen several guides without any libraries. Or have I just missed something important to get it to work
Code: Select all
long milli;
void setup() {
milli = millis();
}
void loop() {
//As long as as start(); isn't executed I can talk to ESP8266
if(milli+10000 < millis()){
start();
}
}
void start(){
Serial.begin(115200);
Serial.println("AT");
//After Serial.begin I can't talk to it anymore and it doesn't respond with OK
delay(5000);
if(Serial.find("OK")){
//Do something
Serial.println("OK");
}
}
//First 10 seconds when I can talk to it
AT
OK
//After Serial.begin
AT
AT
AT
AT
AT
AT