From c93cd80f58fe49941dc24fdefa47fd68cafa4481 Mon Sep 17 00:00:00 2001 From: gitgrimbo Date: Wed, 11 May 2016 08:21:23 +0100 Subject: [PATCH] Improve comments for AutoConnectWithStaticIP example --- .../AutoConnectWithStaticIP.ino | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/examples/AutoConnectWithStaticIP/AutoConnectWithStaticIP.ino b/examples/AutoConnectWithStaticIP/AutoConnectWithStaticIP.ino index af343cd..86556d3 100644 --- a/examples/AutoConnectWithStaticIP/AutoConnectWithStaticIP.ino +++ b/examples/AutoConnectWithStaticIP/AutoConnectWithStaticIP.ino @@ -35,16 +35,21 @@ void setup() { //reset settings - for testing //wifiManager.resetSettings(); - //set static ip - //the commented bit only works for ESP8266 core 2.1.0 or newer - /*IPAddress _ip,_gw,_sn; - _ip.fromString(static_ip); - _gw.fromString(static_gw); - _sn.fromString(static_sn); -*/ + //set static ip + //block1 should be used for ESP8266 core 2.1.0 or newer, otherwise use block2 + + //start-block1 + //IPAddress _ip,_gw,_sn; + //_ip.fromString(static_ip); + //_gw.fromString(static_gw); + //_sn.fromString(static_sn); + //end-block1 + + //start-block2 IPAddress _ip = IPAddress(10, 0, 1, 78); IPAddress _gw = IPAddress(10, 0, 1, 1); IPAddress _sn = IPAddress(255, 255, 255, 0); + //end-block2 wifiManager.setSTAStaticIPConfig(_ip, _gw, _sn);