Hi, I am using esp8266 with arduino UNO. If I upload and empty sketch and open the serial monitor, I can send AT commands and I get the correct responses and everything works just fine. But I want to put the AT commands into my code, like this:
Serial.begin(9600);
Serial.setTimeout(5000);
Serial.println("AT+RST");
delay(3000);
if(Serial.find("ready"))
{
//blink LED for example
}
But when i upload a code like this, it does not work, I do not see any responses in the serial monitor and the LED is not blinking. What am I doing wrong? Thanks.
Hi, its easier than that, just type the commands (eg AT or AT+RST) in the serial monitor and hit "send", you will get the responce in the monitor, hope everything goes in yours cause I have some problems with mine.
Many times ESP-01 comes with no firmware..... that is why many times it does not work.
I am having the exact same problem and I cannot understand how most people aren't having it . What am I doing wrong? Did you finally get it to work ?? 
dont get really frustating, one thing is to see that the esp respond, another issue is to make it achievable with arduino and AT commands. I could make respond with "AI-v0.9.5.0 AT Firmware". Greetings.
Op, use
Serial.print("AT+RST\r") [\code]
Hi, I am trying to connect ESP8266 to Arduino UNO
- For the pin connections, using following
ESP8266 pins
- VCC, GPIO0, GPIO2, RESET, CH_PD - Connect to VCC (3.3 V) through external battery
- Rx - Connect to Tx of Arduino using voltage divider so that high from Tx(Arduino) is seen as 3.3V at Rx(ESP8266)
- Tx - Connect to Rx of Arduino
- Gnd - Connect to Gnd of external battery
- Make Arduino Gnd connect to the Gnd of external battery as well to have same reference.
Uploaded empty sketch in Arduino UNO - so that it behaves as simple UART.
When I switch on the ckt, ESP8266 shows RED LED i.e. it gets powered on. Bluw LED on it blinks for a while indicating "Initializing".
Using TeraTerm, I connect to the serial port (for Arduino connected). Setting terminal Rx and Tx as LF+RF and Local Echo. Tried different baud rates as 57600, 9600 and 115200.
But no response from ESP8266 for AT commands. (AT, AT+RST, AT+GMR).
Kindly help me.
I'd highly recommend that the first step with any ESP8266 is to flash new firmware on it. There are so many sellers of these modules and you have no idea what firmware is on it or if there is any on it at all.
With my first modules, using whatever "AT" style firmware was on them, I found them very erratic even after pinning down the correct baud rate -- every ~10th or so byte was mangled. I flashed the NodeMCU firmware on them and never had a wonky connection again. Even the flashing sequence didn't show the same communication errors even though it was flashing ~520KB of data.