Skip to content

Commit 715eccb

Browse files
committed
interactive example update with re-setting IP by dhcp
1 parent e3c9702 commit 715eccb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/esp8266/examples/interactive/interactive.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void loop() {
8585
case 'n': DO(WiFi.setSleepMode(WIFI_NONE_SLEEP));
8686
case 'l': DO(WiFi.setSleepMode(WIFI_LIGHT_SLEEP));
8787
case 'm': DO(WiFi.setSleepMode(WIFI_MODEM_SLEEP));
88-
case 's': DO(WiFi.config(staticip, gateway, subnet));
89-
case 'D': DO(wifi_station_dhcpc_start());
88+
case 'S': DO(WiFi.config(staticip, gateway, subnet)); // use static address
89+
case 's': DO(WiFi.config(0u, 0u, 0u)); // back to dhcp client
9090
}
9191
}

0 commit comments

Comments
 (0)