mirror of
https://github.com/nodemcu/nodemcu-firmware.git
synced 2025-01-30 21:12:55 +08:00
Fix WiFi example
This commit is contained in:
parent
ebd147b34f
commit
38262e995a
@ -21,9 +21,13 @@ srv:listen(80, function(conn)
|
|||||||
end)
|
end)
|
||||||
```
|
```
|
||||||
```lua
|
```lua
|
||||||
-- connect to WiFi access point
|
-- connect to WiFi access point (DO NOT save config to flash)
|
||||||
wifi.setmode(wifi.STATION)
|
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
|
```lua
|
||||||
|
Loading…
x
Reference in New Issue
Block a user