First of all amazing conzept guyz!!! Apriciate all the effort!
But I cannot get working my first project:
I have win10, arduino IDE 1.7.11, Blynk release 0.4.0 installed manually (actually longside with just “Blynk” which I installed previously)
DHCP works fine, have slots etc. I have all the libraryes installed, using ENC28J60 example and it’s got compiled with no erros. I checked wiring according to instruction in the sketch (there was an error - “int” wire was not conected, but after fixing it nothing changed). And I’m using my project token.
So when I’m running it with DHCP I have in Serial Monitor:
[0] Blynk v0.4.0 on Arduino Mega
[0] Getting IP…
[60447] DHCP Failed!
and so on…
When I’m runing it with manual adresses:
[0] Blynk v0.4.0 on Arduino Mega
[0] Using static IP
[1051] IP:192.168.1.27
[5001] Connecting to blynk-cloud.com:8442
[20058] Connecting to blynk-cloud.com:8442
[35116] Connecting to blynk-cloud.com:8442
and so on…
Below is the sketch I’m using for manual settings, while trying to use DHCP I just changing my Token in original ENC28J60 example:
#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[] = "efcc**********************6acba";
// Mac address should be different for each device in your LAN
//byte arduino_mac[] = { 0xDE, 0xED, 0xBA, 0xFE, 0xFE, 0xED };
byte arduino_mac[] = { 0xDE, 0xED, 0xBA, 0xFE, 0xFE, 0xED };
IPAddress arduino_ip ( 192, 168, 1, 27);
IPAddress dns_ip ( 192, 168, 1, 1);
IPAddress gateway_ip ( 192, 168, 1, 1);
IPAddress subnet_mask(255, 255, 255, 0);
void setup()
{
Serial.begin(9600);
//Blynk.begin(auth);
// You can also specify server.
// For more options, see BoardsAndShields/Arduino_Ethernet_Manual example
Blynk.begin(auth, "blynk-cloud.com", 8442, arduino_ip, dns_ip, gateway_ip, subnet_mask, arduino_mac);
//Blynk.begin(auth, IPAddress(192,168,1,21), 8888);
//Blynk.begin(auth, "blynk-cloud.com", 8442);
}
void loop()
{
Blynk.run();
}