BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

ESP not responding

arduino
esp8266

#1

Hi,
I am trying to connect my esp with arduino uno. My firmware version is showing
AT+GMR
AT version:0.50.0.0(Sep 18 2015 20:55:38)
SDK version:1.4.0
compile time:Sep 18 2015 21:32:07
OK

But, after uploading the code and powering esp ,it is showing
19]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ / '/
/
//_, /////_
/
__/ v0.5.4 on Arduino Uno

[527] Connecting to Huda
AT
[1537] ESP is not responding
AT+CIPCLOSE=1
AT+CIPCLOSE=1
AT+CIPSTART=1,“TCP”,“blynk-cloud.com”,80
AT+CIPCLOSE=1
AT+CIPCLOSE=1
Tried to connect RX/TX with voltage divider and also direct. and my ESP is powering with external 3.3 V source. I just use RX/TX of arduino to ESP and TX/RX.
Below is my code

#define BLYNK_PRINT Serial
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "483be2aca4d94569af1d945e027836e2";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "Huda";
char pass[] = "70245815";
// Hardware Serial on Mega, Leonardo, Micro...
//#define EspSerial Serial1
// or Software Serial on Uno, Nano...
//#include <SoftwareSerial.h>
//SoftwareSerial EspSerial(2, 3); // RX, TX
// Your ESP8266 baud rate:
#define ESP8266_BAUD 115200
ESP8266 wifi(&Serial);
void setup()
{
 // Debug console
 Serial.begin(9600);
 delay(10);
 // Set ESP8266 baud rate
 Serial.begin(ESP8266_BAUD);
 delay(10);
 Blynk.begin(auth, wifi, ssid, pass);
}
void loop()
{
 Blynk.run();
} 

#2

@Samiul_Huda_Durbar: The problem is that you use “Serial” for debug output AND for communication with the ESP.

#define BLYNK_PRINT Serial
...
ESP8266 wifi(&Serial);
...

void setup()
{
...
 Serial.begin(9600);
...
 Serial.begin(ESP8266_BAUD);
...
}

I’d suggest to put the Debug or ESP on a soft-serial interface - as indicated in the comments in your example code - to have two independent interfaces.


#3

Would you please give a example of the code? I am still in confusion


#4

I’m so sorry to hear of your plight.

You can’t have the mighty Serial Monitor with the connection method you have chosen without additional hardware i.e. USB2TTL adaptor.

So if you don’t have an adaptor you have to work “blind” i.e. without Serial Monitor.
Look at the narrative in the sketch regarding Mega’s and Uno’s etc.


#5

hey, i am able to interface with serial monitor, as i put the data’s which are shown in the monitor. I have a CP2102 usb to ttl, which i used for flash. Monitor is showing the communication, but esp is not responding. Is my firmware version okay or could you suggest any modification on sketch


#6

I think the firmware is probably OK.

If you are still using the first sketch you posted then study it and repost a revised version.


#7

It is already shown, in the comments of your posted sketch, the modifications for using an UNO… you need the Software Serial setup, not direct Serial


#8

I revised, is it okay?

//Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "483be2aca4d94569af1d945e027836e2";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "Huda";
char pass[] = "70245815";
// Hardware Serial on Mega, Leonardo, Micro...
#define EspSerial Serial1
// or Software Serial on Uno, Nano...
#include <SoftwareSerial.h>
SoftwareSerial Serial1(2, 3); // RX, TX
// Your ESP8266 baud rate:
#define ESP8266_BAUD 115200
ESP8266 wifi(&Serial);
void setup()
{
 // Debug console
 Serial.begin(9600);
 Serial1.begin(115200);
 delay(10);
 // Set ESP8266 baud rate
 Serial.begin(ESP8266_BAUD);
 delay(10);
 Blynk.begin(auth, wifi, ssid, pass);
}
void loop()
{
 Blynk.run();
} 

#9

@Samiul_Huda_Durbar: I’d try like this:

#define BLYNK_PRINT Serial

#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "YourAuthToken";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "YourNetworkName";
char pass[] = "YourPassword";

// Hardware Serial on Mega, Leonardo, Micro...
//#define EspSerial Serial1

// or Software Serial on **Uno**, Nano...
#include <SoftwareSerial.h>
SoftwareSerial EspSerial(2, 3); // RX, TX

// Your ESP8266 baud rate:
#define ESP8266_BAUD 115200

ESP8266 wifi(&EspSerial);

void setup()
{
  // Debug console
  Serial.begin(9600);
  delay(10);

  // Set ESP8266 baud rate
  EspSerial.begin(ESP8266_BAUD);
  delay(10);
  Blynk.begin(auth, wifi, ssid, pass);
}

void loop()
{
  Blynk.run();
}


#10

No… you have mixed up all these different references. Serial1 is for the Mega and leonardo only.


#11

I tried, but still serial monitor showing below result:
[19]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ / '/
/
//_, /////_
/
__/ v0.5.4 on Arduino Uno

[609] Connecting to Huda
[1619] ESP is not responding

I can see that blue led on ESP device is lit up all the time
Here is my code as per your advice:

#define BLYNK_PRINT Serial

#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "483be2aca4d94569af1d945e027836e2";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "Huda";
char pass[] = "70245815";

// Hardware Serial on Mega, Leonardo, Micro...
//#define EspSerial Serial1

// or Software Serial on **Uno**, Nano...
#include <SoftwareSerial.h>
SoftwareSerial EspSerial(3,2); // RX, TX

// Your ESP8266 baud rate:
#define ESP8266_BAUD 115200

ESP8266 wifi(&EspSerial);

void setup()
{
  // Debug console
  Serial.begin(9600);
  delay(10);

  // Set ESP8266 baud rate
  EspSerial.begin(ESP8266_BAUD);
  delay(10);
  Blynk.begin(auth, wifi, ssid, pass);
}

void loop()
{
  Blynk.run();
}


#12

Software Serial isn’t capable of reliability supporting communication at that high a baud rate. You should use 9600.
But, your ESP needs to be configured to talk to your ESP at the ••same•• baud rate. This needs to be done via an AT command.

There is lots of information about this on the forum, so I’d suggest that you search for “Arduino ESP-01” and do your research.

Pete.