I am using an Arduino Mega with an ESP8266 module, that I try to connect with Blynk through Wi-Fi.
But I encounter the following problem: on the Blynk app it shows “Device wasn’t online yet”, I suspect that it’s due to the fact that my ESP8266 cannot establish a connection with the Blynk Cloud. In fact, when I run the example code, the ESP doesn’t seem to ping with the server.
I have done a lot of research but none seems to lead me anywhere. Does anyone have an idea ?
#define BLYNK_PRINT Serial
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
// Set ESP8266 Serial object
#define EspSerial Serial1
ESP8266 wifi(&EspSerial);
char auth[] = "I0oxxxxxxxxxxxxxx0cUJCW7iB6B";
void setup()
{
Serial.begin(9600); // Set console baud rate
delay(10);
EspSerial.begin(9600); // Set ESP8266 baud rate
delay(10);
Blynk.begin(auth, wifi, "Macha","txxxxxxxxg");
}
void loop()
{
Blynk.run();
}
With the mega and an esp8266-01 at best you should use a capacitor to handle the extra power consumption. Better yet a separate power supply with the grounds connected. Also try refreshing the auth code.
NOTE please use triple backticks for posting code. They are sometimes hard to find.
Hi Pete, thank you for your answer,
I have changed the auth a few times, it seems to me that it isn’t the problem, I’ll try again though. About the wiring I don’t think that something is wrong with it either. Can you please elaborate on the “ISP blocking port 80”.
Yes, when you edit your original post and replace the blockquotes with triple backticks at the beginning and end of the code.
Triple backticks look like this:
```