diff --git a/ArduinoProps.zip b/ArduinoProps.zip index 66072ed..2b00e9a 100644 Binary files a/ArduinoProps.zip and b/ArduinoProps.zip differ diff --git a/examples/BlinkOnEthernetProps/BlinkOnEthernetProps.ino b/examples/BlinkOnEthernetProps/BlinkOnEthernetProps.ino index 4451eca..a1f6fde 100644 --- a/examples/BlinkOnEthernetProps/BlinkOnEthernetProps.ino +++ b/examples/BlinkOnEthernetProps/BlinkOnEthernetProps.ino @@ -14,8 +14,8 @@ #include #include "ArduinoProps.h" -byte mac[] = { 0xFC, 0xFA, 0xEA, 0x00, 0x00, 0x02 }; //<<< MAKE SURE IT'S UNIQUE IN YOUR NETWORK!!! -String ip = "192.168.1.19"; //<<< ENTER YOUR IP ADDRESS HERE ("" for DHCP) +byte mac[] = { 0x46, 0x4F, 0xEA, 0x10, 0x20, 0x02 }; //<<< MAKE SURE IT'S UNIQUE IN YOUR NETWORK!!! and not a reserved MAC +String ip = ""; //<<< ENTER YOUR IP ADDRESS HERE ("" for DHCP) // Builtin led is not available with the shield #undef LED_BUILTIN @@ -53,7 +53,7 @@ void setup() delay(1500); // time for shield stuff - // can do more static IP configuration + // can do more static IP configuration, must be called after Ethernet.begin() //Ethernet.setSubnetMask(IPAddress(255, 255, 255, 0)); //Ethernet.setGatewayIP(IPAddress(192, 168, 1, 1)); //Ethernet.setDnsServerIP(IPAddress(192, 168, 1, 1)); diff --git a/examples/BlinkOnWifiProps/BlinkOnWifiProps.ino b/examples/BlinkOnWifiProps/BlinkOnWifiProps.ino index a05dc1d..e295453 100644 --- a/examples/BlinkOnWifiProps/BlinkOnWifiProps.ino +++ b/examples/BlinkOnWifiProps/BlinkOnWifiProps.ino @@ -40,11 +40,6 @@ bool wifiBegun(false); void setup() { - // can do more static IP configuration - //WiFi.config(IPAddress(), IPAddress(), IPAddress()); - //WiFi.config(IPAddress(), IPAddress()); - //WiFi.config(IPAddress()); - props.addData(&clignoter); props.addData(&led); @@ -59,6 +54,11 @@ void loop() { if (!wifiBegun) { WiFi.begin(ssid, passphrase); + // do static IP configuration disabling the dhcp client, must be called after every WiFi.begin() + //WiFi.config(IPAddress(192, 168, 1, 21), // local_ip + // IPAddress(192, 168, 1, 1), // dns_server + // IPAddress(192, 168, 1, 1), // gateway + // IPAddress(255, 255, 255, 0)); // subnet delay(250); // acceptable freeze for this props (otherwise use PropsAction for async-like behavior) if (WiFi.status() == WL_CONNECTED) { wifiBegun = true;