5

I have a ESP8266_01, and I wired up. It does not work for me.

I have connected the ESP to an Arduino Uno. I am using a 5V pin from uP with a 3.3V regulator, and I have a voltage divider between RX(ESP) and TX(uP). And I am sure that the wiring is correct. The thing is, I am not getting anything back from ESP, not even errors. And I tried to use different baudrates as well. There is a blue LED flashing from ESP only when I am using 115200, and red LED lights up constantly at any other baudrate.

What have I done wrong here?

I did 4 hours of research already and don't know what else I can do now. If you have any idea, please leave me a word.

1
  • I did the exact same method and got looping of "Sending an AT command...". Seems to me software serial did not print AT. When I connect using a FTDI cable, it works perfectly. I am sure the ESP8266 is working but I am unsure that my connections are correct. I use an external 2 AAA batteries to power the chip as well as 3.3V from the board. For TX RX, I use logic shifter and voltage divider. All combinations failed to produce results. Please advise.
    – user29191
    Commented Dec 17, 2016 at 0:10

1 Answer 1

4

Start by uploading blink sketch to your Arduino then connect it to your ESP8266 like this: TX-TX and RX-RX.

Now open Serial Monitor and send AT command and see if it responds. If so then you can control it using your Arduino by wiring it back to TX-RX and RX-TX.

PS: Don't forget to set the line ending in the Serial Monitor to Newline or Carriage Return.

Edit: Use this code to connect to ESP8266:

#include <SoftwareSerial.h>

const byte rxPin = 2; // Wire this to Tx Pin of ESP8266
const byte txPin = 3; // Wire this to Rx Pin of ESP8266

// We'll use a software serial interface to connect to ESP8266
SoftwareSerial ESP8266 (rxPin, txPin);

void setup() {
  Serial.begin(115200);
  ESP8266.begin(115200); // Change this to the baudrate used by ESP8266
  delay(1000); // Let the module self-initialize
}

void loop() {
  Serial.println("Sending an AT command...");
  ESP8266.println("AT");
  delay(30);
  while (ESP8266.available()){
     String inData = ESP8266.readStringUntil('\n');
     Serial.println("Got reponse from ESP8266: " + inData);
  }  
}

Since the Hardware Serial interface will be busy when connected to Computer, then you have to use another Serial interface to communicate with your ESP8266. In this case, Software Serial comes handy.

5
  • Not sure about uploading blink sketch?
    – Chen
    Commented Nov 10, 2015 at 19:22
  • Trust me, I've ran into that problem of yours. You need to upload blink sketch or any sketch that doesn't use the Serial interface (I've chosen blink since it's already there).
    – Ikbel
    Commented Nov 10, 2015 at 19:25
  • YOU ARE ALMOST SAVING ME! Yes it does reply me a OK, when i send AT! But when I try to wire it back to TX-RX,RX-TX, it gets stone again?
    – Chen
    Commented Nov 10, 2015 at 19:35
  • 1
    Yeah, what I've told you to do lets you bypass your microcontroller and just use the board to connect to ESP8266. When you wire it back to Rx-Tx then you must make the microcontroller take over. I'll send you a code that you can use to send an AT command and get response.
    – Ikbel
    Commented Nov 10, 2015 at 19:38
  • THX a lot, man!
    – Chen
    Commented Nov 10, 2015 at 19:42

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