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 …

Hi @jaypatil007,

This post was moved to a different board that fits your topic of discussion a bit better. This means you’ll get better engagement on your post, and it keeps our Community organized so users can more easily find information.

As you’ll notice, your Topic is now in the Project Development Help and Advice board. No action is needed on your part; you can continue the conversation as normal here.

Let me know if you have any other questions or if I can help with anything else.

Cheers!

1 Like