Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text and code segment do not match #23

Open
PeterOGB opened this issue Nov 28, 2022 · 0 comments
Open

Text and code segment do not match #23

PeterOGB opened this issue Nov 28, 2022 · 0 comments

Comments

@PeterOGB
Copy link

The text says

"If you’ve ever connected a device to a WiFi network, you will know that it doesn’t happen instantly. Your device will send requests to your WiFi router to connect, and when the router responds, they will perform what is called a handshake to establish a connection. To do this with Python, you can set up a loop that will keep sending requests each second until the connection handshake has been performed."

but the following code segment does not do that, it only tests if the connection has been established yet 👍

web_server.py

def connect():
#Connect to WLAN
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect(ssid, password)
while wlan.isconnected() == False:
print('Waiting for connection...')
sleep(1)

The text should reflect the functionality in the code segment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant