Recall & Review
beginner
What is the purpose of the
WiFi.begin(ssid, password) function in ESP8266/ESP32 programming?It starts the WiFi connection process by trying to connect the ESP device to the specified WiFi network using the given SSID and password.
Click to reveal answer
beginner
How can you check if the ESP8266/ESP32 is connected to WiFi?
Use
WiFi.status() == WL_CONNECTED. If true, the device is connected to the WiFi network.Click to reveal answer
beginner
What does
WiFi.localIP() return?It returns the IP address assigned to the ESP device by the WiFi network, which you can use to communicate with it.
Click to reveal answer
intermediate
Why is it important to include
delay() or yield() inside the WiFi connection loop?Because it allows the ESP to handle background tasks and prevents the watchdog timer from resetting the device during connection attempts.
Click to reveal answer
intermediate
What is the difference between
WiFi.begin() and WiFi.config()?WiFi.begin() connects to a WiFi network using DHCP by default. WiFi.config() lets you set a static IP address, gateway, and subnet before connecting.Click to reveal answer
Which function starts the WiFi connection on ESP8266/ESP32?
✗ Incorrect
The correct function to start connecting to a WiFi network is WiFi.begin(ssid, password).
How do you check if the ESP device is connected to WiFi?
✗ Incorrect
WiFi.status() returns the connection status. WL_CONNECTED means the device is connected.
What does
WiFi.localIP() provide?✗ Incorrect
WiFi.localIP() returns the IP address assigned to the ESP device by the router.
Why should you use
delay() or yield() inside the WiFi connection loop?✗ Incorrect
Including delay() or yield() lets the ESP handle background tasks and avoids watchdog resets.
What is the purpose of
WiFi.config()?✗ Incorrect
WiFi.config() lets you set a static IP, gateway, and subnet before connecting to WiFi.
Explain the steps to connect an ESP8266 or ESP32 to a WiFi network using Arduino code.
Think about how you start, check, and confirm the WiFi connection.
You got /5 concepts.
Describe the difference between using DHCP and static IP configuration on ESP8266/ESP32 WiFi connection.
Consider how the device gets its IP address.
You got /4 concepts.