AT commands via SoftwareSerial?
Posted: Wed Jul 06, 2016 3:27 pm
Hello.
I'm in a bit of a struggle. I'm trying to upload a piece of arduino code to my ESP8266-01, that will make the ESP8266 send AT commands to itself. That should be pretty simple right? Though i'm not very used to working with the SoftwareSerial.h library, i understand that it is able to do this. This is my code so far:
But this doesn't work. I'm using a FT232RL FTDI USB 3.3V 5.5V to TTL Serial Adapter Module, and as far as i understand, pin 1 and 5 is TX/RX on that one. Or am i wrong?
Anyway, uploading this to the ESP8266, gives me nothing, except for a little piece of random symbols and numbers in the first few milliseconds.... What is wrong?
Is it firmware related? Is it because when flashing/uploading arduino code, you overwrite the already installed firmware? Because installing AT firmware and running commands through a serial window works fine until i upload my sketch...
Maybe some of you can clarify what is happening here, and how i could fix it.
Thanks
I'm in a bit of a struggle. I'm trying to upload a piece of arduino code to my ESP8266-01, that will make the ESP8266 send AT commands to itself. That should be pretty simple right? Though i'm not very used to working with the SoftwareSerial.h library, i understand that it is able to do this. This is my code so far:
Code: Select all
#include <SoftwareSerial.h>
SoftwareSerial esp8266(1, 5);
void setup()
{
Serial.begin(115200);
esp8266.begin(115200);
}
void loop()
{
delay(2000);
esp8266.println("AT");
if(esp8266.find("OK")){
Serial.println("Response: OK");
}
}
But this doesn't work. I'm using a FT232RL FTDI USB 3.3V 5.5V to TTL Serial Adapter Module, and as far as i understand, pin 1 and 5 is TX/RX on that one. Or am i wrong?
Anyway, uploading this to the ESP8266, gives me nothing, except for a little piece of random symbols and numbers in the first few milliseconds.... What is wrong?
Is it firmware related? Is it because when flashing/uploading arduino code, you overwrite the already installed firmware? Because installing AT firmware and running commands through a serial window works fine until i upload my sketch...
Maybe some of you can clarify what is happening here, and how i could fix it.
Thanks