/* 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[] = "5f6a31627c61xxxxxxxeda4823c";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "mi y2";
char pass[] = "dilkhush@20";
// 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 9600
ESP8266 wifi(&EspSerial);
WidgetLED led1(V1);
BlynkTimer timer;
// V1 LED Widget is blinking
void blinkLedWidget()
{
if (led1.getValue()) {
led1.off();
Serial.println("LED on V1: off");
} else {
led1.on();
Serial.println("LED on V1: on");
}
}
void setup()
{
// Debug console
Serial.begin(9600);
// Set ESP8266 baud rate
EspSerial.begin(ESP8266_BAUD);
delay(10);
Blynk.begin(auth, wifi, ssid, pass);
timer.setInterval(1000L, blinkLedWidget);
}
void loop()
{
Blynk.run();
timer.run();
}
sir please help me i have read many post about in esp8266 in the community but it doesn’t help me . iam facing the problem because as you see in picture there is no ping .i tried connecting to wifi many time all the time wifi connected but only one time i see the option of ping only once and after that time till now i have no ping option in serial monitor .i hope that my problem may be solved .i have firmware version 0.9.5.0 flashed in esp 8266 and using it with arduino .All at command works in 96000 baud rate. @Gunner@Costas
Yet you missed the parts about formatting your posted code as per the Welcome Topic, I fixed that.
And NOT posting your AUTH so others here can mess with your project I fixed that as well but you might want to change it.
Also about NOT calling out regulars to look at your code… everyone, including us, will see it eventually anyhow.
As for your issue… yes there are many topics about using an ESP as a shield for Arduino. And since you did get connected at least once, your pinouts should be fine. Perhaps look at the guidelines about proper power for the ESP as well.
I am new to this forum so I do not know the format.sorry for that.
Sir I have checked pinout but there is no ping option
I am powering esp 8266 module via arduino 3.3 volt pinout.wifi get connected then why ping is not there
As mentioned in many of those other topics… Arduino 3.3v pin can NOT provide enough current for most ESP needs… You must have a seperate 3.3v source, typically 500mA+ is a safe bet, and just share the GND between the ESP and Arduino…
Ok sir,it means I should not provide power to esp 8266 via arduino.now I will try to power it by another source.is there any hack to power esp 8266 because I have to go to city to buy robotics part which is 100 km far from my village.
Sir I have esp module which require 3.3 volt and my laptop and charger provide 5v if I provide power from them to esp8266 may be it will stop working.will you provide any hack method.
You need min 500mA I think, so a voltage divider with resistors will probably not do the job well at all… You basically need a 3.3v voltage regulator of some sort.
My WeMos runs at about 90mA and would probably be fine running from an Arduino but those nasty ESP01’s can draw a huge amount of power and interfere with your WiFi.