I have an Arduino nano and an ESP8266-01.

The first thing to do seems to be to send AT commands via the serial monitor and see the replies.

ESP connect as follows:

  GND   GND   
  GPIO2 not connected
  GPIO0 not connected
  RX    to Arduino RX via level shifter
  TX    to Arduino TX via level shifter
  CHPD  3.3V
  RST   3.3V
  VCC   3.3V

Image of breadboard (imgur rejects) https://www.dropbox.com/s/aif8afi29amy02h/20180807_135218.jpg?dl=0

When connecting the red light comes on and the blue light flashes quickly (and the Arduino RX light flashes with it) then goes out.

Here is the sketch I'm using. (The ESP8266 must be disconnected from RX+TX for uploading of the sketch to work.)

     void setup() { 

  digitalWrite(LED_BUILTIN, HIGH); 
  digitalWrite(LED_BUILTIN, LOW);

void loop() {
  digitalWrite(LED_BUILTIN, HIGH); 
  digitalWrite(LED_BUILTIN, LOW);

(I like to blink the LED to demonstrate that uploading worked.)

With the serial monitor set to 115200 (NL&CR) I sent AT and nothing happens.

What have I got wrong? I really don't understand! Thanks in advance for any suggestions.

(This is actually my third ESP8266. The first worked fine on 5V but stopped working after I set the baud rate to 9600. I presume 5V killed it but it's strange that it worked for so long. The second, connected as above, when powered up made that power supply red hot and melted the jumpers.)


2 Answers 2


First problem is that io 0 of the esp8266 must be pulled HIGH for normal boot. With io 0 not HIGH, the esp8266 starts in flashing mode.

Your other problem is the reset pin connection. It must be connected with pull-up resistor or not connected.

See ESP8266 Hardware Design Guidelines

Pin32 serves as an RST pin which can be left floating when it is not used. The reset pin is held low when the chip is enabled. In order to avoid resets caused by external interference, the lead is generally required to be short, and no external pull-up resistor is necessary

I suspect that "The reset pin is held low when the chip is enabled." is a bad translation. They say in pin description "32 EXT_RSTB I External reset signal (Low voltage level: Active)". What they mean is that the chip resets when reset pin is set LOW.

  • Disconnecting it hasn't made any difference. Aug 7, 2018 at 15:34
  • remove the level shifter from esp8266 TX pin
    – Juraj
    Aug 7, 2018 at 16:56
  • With TX connected directly to Arduino TX: no change except that the ESP8266 blue light does not now flash when powering it on. Aug 7, 2018 at 17:04
  • important! set io0 of esp8266 HIGH with a pullup resistor
    – Juraj
    Aug 7, 2018 at 17:26
  • 1
    remove Serial.begin from Nano sketch or better put Nano in permanent reset connecting reset pin of Nano to ground
    – Juraj
    Aug 7, 2018 at 18:00


  • Connect the ESP8266 RX/TX directly to the Arduino, not via the level shifter.
  • No need to connect GPIO0.
  • RST can be either left floating or connected to 3.3V; it makes no difference.
  • No need to Serial.begin; an empty sketch will work.

This is what you want to see in the terminal:






+CWLAP:(3,"MY WIFI 6739",-38,"18:e3:bc:2c:67:39",6,127,0)


The next thing to do is to set the ESP8266's baud rate to 9600 so that it can be used with SoftwareSerial. The command to do this is


Then we can move the ESP8266 off the Arduino's RX/TX pins onto some other pins and forward commands from the terminal to the ESP8266 and print the responses.

#include <SoftwareSerial.h>

#define RX 10
#define TX 11
SoftwareSerial esp8266(RX, TX);

void setup() {
  Serial.println("setup() done");

    // Check for messages form the ESP8266 and process them.
void processEsp() {
  while (esp8266.available() > 0) {
    String line = esp8266.readStringUntil('\n');

void loop() {
  if (Serial.available() > 0)
    String command = Serial.readStringUntil('\n'); // AT+CWLAP
    Serial.println("Command Sent: " + command);

  // We wait once.
  // During that wait the buffer fills, and we only see what's in the buffer.

void processLine(String line) {

The serial reader must run in a tight loop; a delay causes it's buffer to fill and characters beyond the buffer length are lost. Enabling the delay causes the AT+CWLAP response to be truncated.

There is no way to detect the end of a response to an AT command. The ESP8266 can send anything at any time. What it sends should be processed line by line; the line/record delimiter is \r\n.

  • 1
    the WiFiEsp library has standard Arduino networking API over esp8266 AT commnands. the library can detect the end of the response. (you could al least upvote my answer)
    – Juraj
    Aug 10, 2018 at 6:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.