File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -184,16 +184,16 @@ See :ref:`network.WLAN <network.WLAN>` and :mod:`machine`. ::
184
184
from network import WLAN
185
185
186
186
# configure the WLAN subsystem in station mode (the default is AP)
187
- wifi = WLAN(mode=WLAN.STA)
187
+ wlan = WLAN(mode=WLAN.STA)
188
188
# 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():
193
193
pass
194
- print(wifi .ifconfig())
194
+ print(wlan .ifconfig())
195
195
# enable wake on WLAN
196
- wifi .irq(trigger=WLAN.ANY_EVENT, wake=machine.SLEEP)
196
+ wlan .irq(trigger=WLAN.ANY_EVENT, wake=machine.SLEEP)
197
197
# go to sleep
198
198
machine.sleep()
199
199
# now, connect to the FTP or the Telnet server and the WiPy will wake-up
You can’t perform that action at this time.
0 commit comments