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.

  • 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 Dec 17 '16 at 0:10
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.

  • Not sure about uploading blink sketch? – Chen Nov 10 '15 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 Nov 10 '15 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 Nov 10 '15 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 Nov 10 '15 at 19:38
  • THX a lot, man! – Chen Nov 10 '15 at 19:42

protected by Community Dec 20 '16 at 4:39

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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