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

[SOLVED] Healthy connection problem with ESP8266-01

esp8266

#1

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


#2

That is needed for healthy Blynking


#3

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

Pete.


#4

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


#5

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:


#6

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:


#7

how can i change it?


#8

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

Pete.


#9

it’s not work

help pls :hot_face:


#10

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.


#11

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


#12

@ZgnTN

What AT firmware version are you running?

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


#13

:smiley: maybe 1000 step :slight_smile:

thank of all both


#14

I’m using ESP Flasher


#15

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.


#16

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

How are you programming the ESP-01?


#17

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.


#18

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)