I’m trying to connect a Nano with Ethernet shield to the Blynk cloud using the standard script from the Blynk examples for Nano and ENC28J60 Ethernet shield
This is the code
#include <UIPEthernet.h>
#include <BlynkSimpleUIPEthernet.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "xxxxx";
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);
Blynk.begin(auth);
// You can also specify server:
//Blynk.begin(auth, "blynk-cloud.com", 80);
//Blynk.begin(auth, IPAddress(192,168,1,100), 8080);
timer.setInterval(1000L, blinkLedWidget);
}
void loop()
{
Blynk.run();
timer.run();
}
The problem is that it keeps restarting after trying to connect to the Blynk cloud (timeout ??). See Serial Monitor text below. I’ve connected a Uno with 5200 Ethernet shield without difficulty, so am unsure if this is a Nano issue or what. Given that the router is assigning an IP address, it would appear that the Ethernet shield is doing its job correctly. Any thoughts/comments are appreciated.
[0] Getting IP…
[6475] IP:192.168.2.7
[6476]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ / '/
///_, /////_
/__/ v0.6.1 on Arduino Nano
[6603] Connecting to blynk-cloud.com:80
[24615] Connecting to blynk-cloud.com:80
[25[0] Getting IP…
[6465] IP:192.168.2.7
[6465]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ / '/
///_, /////_
/__/ v0.6.1 on Arduino Nano
[6582] Connecting to blynk-cloud.com:80
[31594] Connecting to blynk-cloud.com:80
[32[0] Getting IP…
[6467] IP:192.168.2.7
[6468]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ / '/
///_, /////_
/__/ v0.6.1 on Arduino Nano
[6585] Connecting to blynk-cloud.com:80
[31596] Connecting to blynk-cloud.com:80
[33[1] Getting IP…
[6516] IP:192.168.2.7
[6517]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ / '/
///_, /////_
/__/ v0.6.1 on Arduino Nano