Good night, I’m getting disconnect every 3-5 minutes in my Blynk, my code was working right…
I tried to upload the Blynk ENC28J60 and I’m still getting disconnect every 5 minutes…
Code:
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <UIPEthernet.h>
#include <BlynkSimpleUIPEthernet.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "My token...."; // (BLYNK) Código Token
void setup()
{
Serial.begin(9600);
Blynk.begin(auth);
// You can also specify server.
// For more options, see Boards_Ethernet/Arduino_Ethernet_Manual example
//Blynk.begin(auth, "blynk-cloud.com", 8442);
//Blynk.begin(auth, IPAddress(192,168,1,100), 8888);
}
void loop()
{
Blynk.run();
}
What’s going on? I tried to reboot the PC and Arduino.
First off, your method of posting your code is incorrect, don’t use the carrot > before each line, wrap the whole code in between backticks like this:
Otherwise it look like your defines and libraries (and possibly other code) are not syntaxed correctly:
define BLYNK_PRINT Serial // Comment this out to disable prints and save space
include UIPEthernet.h
include BlynkSimpleUIPEthernet.h
should look like:
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include UIPEthernet.h
#include BlynkSimpleUIPEthernet.h
And how are you currently connecting? You mention rebooting the PC, and since your ethernet based Blynk.begin() commands are commented out, my first guess is via USB-link… but you do not have the required library listed:
#include <BlynkSimpleStream.h>
Also, if using the USB-Link, you should comment out define BLYNK_PRINT Serial as it will conflict with the Serial of the Blynk.begin()… which is also wrong for USB-Link as it should be Blynk.begin(Serial, auth);.
I know that but how were you connecting? Ethernet, Wifi, USB, telepathy
What library, the <BlynkSimpleStream.h>? It is included in the Blynk Libraries download. You insert it or other library calls into a sketch as required. I did include a link to a USB connection example in my post - you can try that with the USB link method to see if that is stable.
The USB connection which I mentioned, is only for power supply and for uploading the sketch… My focus is ENC28J60…
And the example which you mentioned to connect the ENC28J60 is exacly like mine, so, my sketch isn’t the problem right? It’s not missing any library, correct?
There are many examples in the Sketch builder. But I don’t know what your library status is (in your Arduino folders).
The purpose of mentioning the USB link is an alternate connection method to help establish if the disconection issue is specifically related to your ENC28J60 or perhaps something else, such as your wiring, router, etc.
@hbadotti I think @Kangmas_Hadi is using the lottery connection method (ESP downgraded as shield to a lowly Arduino) so it’s nothing to do with ENC28J60, which is normally very reliable.