Fix WiFi example

This commit is contained in:
Marcel Stör 2019-03-09 13:46:30 +01:00 committed by GitHub
parent ebd147b34f
commit 38262e995a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -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