From 38262e995a40001cbdd65587d8c50451f46651d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20St=C3=B6r?= Date: Sat, 9 Mar 2019 13:46:30 +0100 Subject: [PATCH] Fix WiFi example --- docs/index.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/index.md b/docs/index.md index 30d11e48..659f394b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -21,9 +21,13 @@ srv:listen(80, function(conn) end) ``` ```lua --- connect to WiFi access point +-- connect to WiFi access point (DO NOT save config to flash) wifi.setmode(wifi.STATION) -wifi.sta.config("SSID", "password") +station_cfg={} +station_cfg.ssid = "SSID" +station_cfg.pwd = "password" +station_cfg.save = false +wifi.sta.config(station_cfg) ``` ```lua