Wi-Fi is the same wireless technology your phone or laptop uses to get on the internet — and it lets your microcontroller do the same thing. Once connected, your board can fetch data from the internet, send data to a website, or even become its own tiny website that other devices can visit. In Open Maker Studio, Wi-Fi blocks handle network connection with retry logic, HTTP GET/POST REST queries, JSON parsing, and a background web server / WebSocket server on port 80.
1. Real-World Uses
Wi-Fi is the go-to choice whenever a project needs to reach the wider internet, not just talk to nearby devices:
- Weather stations that upload temperature/humidity readings to a website or app every few minutes.
- Smart home gadgets — a Wi-Fi-connected relay that you can switch on/off from a phone app anywhere in the world (not just in the same room, unlike Bluetooth).
- IFTTT/webhook automations — e.g. a doorbell button press posts a JSON message that triggers an email, a Slack notification, or a smart light turning on.
- A project's own web page — hosting a small control panel (like a slider or button page) directly from the microcontroller, so any phone/laptop on the same network can open a browser and control it, no app install needed.
Trade-off worth knowing: Wi-Fi uses noticeably more power than Bluetooth or ESP-NOW (Sections 7.2/7.3), so it's a better fit for projects plugged into a wall outlet than for small battery-powered gadgets.
2. Hardware Specifications & Board Support
- Compatible Boards: ESP32 (all variants), ESP8266, Raspberry Pi Pico W, Pico 2 W.
- Frequency Band: 2.4 GHz IEEE 802.11 b/g/n.
- Security Modes: WPA/WPA2 Personal, Open networks.
3. How it Works (Connection Retry & Web/WebSocket Server)
- Connection Retry — same ~15-second timeout on both languages:
- MicroPython: retries up to 15 times at a fixed 1-second interval (not exponential backoff — each retry waits the same 1 second, not a growing delay), printing a
.per attempt. Gives up and returnsFalseafter ~15 seconds if it never connects. If the very firstconnect()call raises anOSError, it also tries one full radio reset (off → wait → on) before retrying. - C++ (Arduino-core): retries up to 30 times at a fixed 500ms interval (also ~15 seconds total), printing a
.per attempt, then reports success or failure viaSerial.printlneither way instead of hanging forever.
- MicroPython: retries up to 15 times at a fixed 1-second interval (not exponential backoff — each retry waits the same 1 second, not a growing delay), printing a
- Web Server — real threading only on the MicroPython side, and only for WebSocket clients: the accept loop itself runs in one background thread; plain HTTP GET requests are handled one at a time inside that same loop. Each WebSocket client that connects gets its own dedicated thread. On C++, the Arduino
WebServerlibrary is not threaded at all — it's a single-threaded, polling design that only processes a request whenserver.handleClient()is called from the mainloop().
