Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 426f326

Browse files
zsquarepluscdanicampora
authored andcommitted
docs/wipy: Make wifi/wlan naming consistent with tutorial.rst.
1 parent 9142179 commit 426f326

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/wipy/quickref.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -184,16 +184,16 @@ See :ref:`network.WLAN <network.WLAN>` and :mod:`machine`. ::
184184
from network import WLAN
185185

186186
# configure the WLAN subsystem in station mode (the default is AP)
187-
wifi = WLAN(mode=WLAN.STA)
187+
wlan = WLAN(mode=WLAN.STA)
188188
# go for fixed IP settings
189-
wifi.ifconfig(config=('192.168.0.107', '255.255.255.0', '192.168.0.1', '8.8.8.8'))
190-
wifi.scan() # scan for available networks
191-
wifi.connect(ssid='mynetwork', auth=(WLAN.WPA2, 'mynetworkkey'))
192-
while not wifi.isconnected():
189+
wlan.ifconfig(config=('192.168.0.107', '255.255.255.0', '192.168.0.1', '8.8.8.8'))
190+
wlan.scan() # scan for available networks
191+
wlan.connect(ssid='mynetwork', auth=(WLAN.WPA2, 'mynetworkkey'))
192+
while not wlan.isconnected():
193193
pass
194-
print(wifi.ifconfig())
194+
print(wlan.ifconfig())
195195
# enable wake on WLAN
196-
wifi.irq(trigger=WLAN.ANY_EVENT, wake=machine.SLEEP)
196+
wlan.irq(trigger=WLAN.ANY_EVENT, wake=machine.SLEEP)
197197
# go to sleep
198198
machine.sleep()
199199
# now, connect to the FTP or the Telnet server and the WiPy will wake-up

0 commit comments

Comments
 (0)