[SOLVED] Healthy connection problem with ESP8266-01

Hello everyone, first I apologize for my bad english. I use the Arduino UNO and Esp8266 module. ESP8266 has current software. I didn’t provide a healthy internet connection although I did the connections and encoding correctly.

The code I use;

#define BLYNK_PRINT Serial



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

char auth[] = "3eb4f15axxxx16";
char ssid[] = "xna";
char pass[] = "melxxxlek";

#include <SoftwareSerial.h>
SoftwareSerial EspSerial(2, 3); // RX, TX

#define ESP8266_BAUD 115200
ESP8266 wifi(&EspSerial);


#define DHTPIN 4
#define DHTTYPE DHT22

Adafruit_CCS811 ccs;
DHT dht(DHTPIN, DHTTYPE);
BlynkTimer timer;

   int c;
   float n;
   float s;

void sendSensor()
{

   ccs.readData();
   int c = ccs.geteCO2();
   float n = dht.readHumidity();
   float s = dht.readTemperature();
  

      Blynk.virtualWrite(V0, s);
      Blynk.virtualWrite(V1, n);
      Blynk.virtualWrite(V2, c);
  
}

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

  EspSerial.begin(ESP8266_BAUD);
  delay(10); 

   Blynk.begin(auth, wifi, ssid, pass);
  

  ccs.begin();
  dht.begin();
  timer.setInterval(1000L, sendSensor);
}

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

--------

Thank you for your interest. Loves from Turkey

That is needed for healthy Blynking

I’m guessing that’s your problem. Too fast for SoftwareSerial.

Pete.

2 Likes

Yes, I missed that… read to fast :stuck_out_tongue:

@ZgnTN

Use this on the ESP - AT+CIOBAUD=9600

And this in the sketch - #define ESP8266_BAUD 9600

23:14:35.979 -> at

23:14:35.979 ->
23:14:35.979 -> OK
23:14:48.250 -> AT+CIOBAUD=9600

23:14:48.250 ->
23:14:48.250 -> ERROR

:disappointed_relieved:

I have no answer… woirks on my ESP-01

AT+CIFSR

+CIFSR:STAIP,"10.10.3.178"
+CIFSR:STAMAC,"5c:cf:7f:3c:b2:08"

OK
AT+CIOBAUD=9600


OK

Now I need to go back and change it, since I use Arduino Mega with Serial1… thus it IS supposed to be 115200 :slight_smile:

how can i change it?

I think iot depends on the firmware version of your ESP-01
AT+UART_DEF=9600,8,1,0,0
might work instead.

Pete.

1 Like

it’s not work

help pls :hot_face:

It’s clearly not a Blynk issue, although some Blynkers may be interested in the eventual solution.

Maybe try re-flashing with the latest AT firmware, or searching on ESP forums, or buying a NodeMCU and using that instead of both your Arduino and ESP-01.

Pete.

@PeteKnight Yup… another 50 step program candidate :wink:

1 Like

@ZgnTN

What AT firmware version are you running?

How are you programming the ESP-01 (what AT communication sketch)?

:smiley: maybe 1000 step :slight_smile:

thank of all both

I’m using ESP Flasher

image

That doesn’t look right… I get this…

AT

OK
AT+GMR
AT version:1.2.0.0(Jul  1 2016 20:04:45)
SDK version:1.5.4.1(39cb9a32)
Ai-Thinker Technology Co., Ltd.
Integrated AiCloud 2.0 v0.0.0.3
Build:1.5.4.1 Jan 10 2017 18:32:04
OK

I think you need to Google for some other firmware and flashing method, then try again.

2 Likes

I tried updating with a few different programs. But I always had the same result.

How are you programming the ESP-01?

As a shield, I simply ran with whatever AT firmware it had preinstalled when I purchased it. I did mess around long ago with reflashing the AT firmware back on one, after test flashing Arduino code on it, but you can Google for the hundreds of tutorials on how to do that.

Yesss! I did it. Thanks to everyone who shows interest.

Those who have the same problem can use the following link;

[https://www.allaboutcircuits.com/projects/flashing-the-ESP-01-firmware-to-SDK-v2.0.0-is-easier-now/](How to Flash ESP-01 Firmware to the Improved SDK v2.0.0)

2 Likes

Dear friend

I think firstly, you should make baudrate together in same value
Your code in define :
#define ESP8266_BAUD 115200
But in setup:
Serial.begin(9600);
Dear…
In example code of arduino, have ex about read humdity and temperature use DHT11
If you got trouble, you can reference. It better for your project

Hi mr PeteKnight

Arduino + Esp 01 very good in small project
Basically, arduino can work with so many sensor type (use 5VDC) instead 3.3vdC
Everyone can easy work on it
And i think with any project have so many interesting things for us to explore

Thank