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

Esp8266 is not running code

I am using Arduino uno with esp8266 and trying to connect it to blynk for further process.

My esp8266 now execute AT command (after flashing with new AT firmware) . and then I connect it to my mobile hotspot. (mobile show it is connected) and now I am uploading following program but esp8266 blue light is not blinking (not blinking fast just 2 3 times)

connections are as follows :-

arduino esp8266

RX - 3

TX - 2

3.3V - VCC and CHPD

GND - GND

GND - GPIO_0

and code is


#define BLYNK_PRINT Serial


#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
char auth[] = "cebc******************76";
char ssid[] = "ET*******";
char pass[] = "123456789";

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

ESP8266 wifi(&EspSerial);

BLYNK_WRITE(V0)
{
int x = param.asInt();
if(x==1)
digitalWrite(13,HIGH);
else if(x==0)
digitalWrite(13,LOW);
}

BLYNK_WRITE(V1)
{
int y = param[0].asInt();
int x = param[1].asInt();
while(x>200)
{
digitalWrite(10,HIGH);
digitalWrite(11,LOW);
digitalWrite(12,HIGH);
digitalWrite(13,LOW);
break;
}
while(x<50)
{
digitalWrite(10,LOW);
digitalWrite(11,HIGH);
digitalWrite(12,LOW);
digitalWrite(13,HIGH);
break;
}
while(y>200)
{
digitalWrite(10,LOW);
digitalWrite(11,LOW);
digitalWrite(12,HIGH);
digitalWrite(13,LOW);
break;
}
while(y<50)
{
digitalWrite(10,HIGH);
digitalWrite(11,LOW);
digitalWrite(12,LOW);
digitalWrite(13,LOW);
break;
}
while(x==128 && y==128)
{
digitalWrite(10,LOW);
digitalWrite(11,LOW);
digitalWrite(12,LOW);
digitalWrite(13,LOW);
break;
}
}

void setup()
{
pinMode(10,OUTPUT);
pinMode(11,OUTPUT);
pinMode(12,OUTPUT);
pinMode(13,OUTPUT);
// Debug console
Serial.begin(115200);

delay(10);

// Set ESP8266 baud rate
EspSerial.begin(ESP8266_BAUD);
delay(10);

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

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

plz help me with this …

Plz edit your post and properly format your code, as required in the Welcome Topic…

Blynk - FTFC

Then read the Help Files and search this forum for keywords like UNO ESP Shield and start reading, as this type of interface has been discussed many, many, much times and need not be rehashed yet again :stuck_out_tongue_winking_eye:

https://community.blynk.cc/search?q=UNO%20ESP%20Shield%20order%3Alatest

http://help.blynk.cc/how-to-connect-different-hardware-with-blynk/arduino/esp8266-with-at-firmware