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
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