Post topics, source code that relate to the Arduino Platform

User avatar
By Labspace
#33850 Hi,

I am using ESP8266 - 01 with default baud rate 115200 and Arduino UNO for my mini project. I interfaced ESP with Arduino and send AT commands via Serial monitor. The ESP responded properly. But when I send the AT commands from the Arduino sketch
Code: Select allSerial.println("AT");
the ESP is not responding. Please help if anyone know how to solve this issue.

Thanks
User avatar
By Labspace
#34194
martinayotte wrote:Any AT commands should end with CR+LF, so you should send the command like :
Code: Select allSerial.println("AT\r\n");


I tested my ESP with the code shown below
Code: Select all#include <SoftwareSerial.h>

SoftwareSerial serial(2,3);
void setup()
{
 Serial.begin(115200);
 serial.begin(115200);

 serial.println("AT\r\n");
 Serial.println(serial.read());
}

void loop()
{

}


But I got a response " -1 ". The ESP still responds to the Serial monitor.

Thanks