0Pricing
Arduino & IoT Academy · Lektion

Im Stationsmodus mit WiFi verbinden

Verbinden Sie sich mit Ihrem Netzwerk und geben Sie die IP-Adresse aus.

Im Stationsmodus mit WiFi verbinden ist eine kostenlose Arduino & IoT Academy-Lektion auf CoddyKit. Dies ist Lektion 3 von 4. Du kannst die komplette Lektion unten kostenlos lesen – dann übst du sie direkt im Browser mit einem integrierten Code-Editor und einem KI-Tutor rund um die Uhr. Sie ist Teil des Arduino & IoT Academy-Lernpfads, und dein Fortschritt wird über Web und CoddyKit-App synchronisiert. Der Arduino & IoT Academy-Kurs umfasst insgesamt 4 Lektionen.

Teile dieser Lektion wurden noch nicht übersetzt und werden auf Englisch angezeigt.

What Station Mode Is

When your board joins an existing network like a phone joins WiFi, that is Station mode. Your router is the host; the ESP is a guest. 📶

Include the Library

Everything starts by including the WiFi library. That one line gives you connect, status, and address functions.

#include <WiFi.h>

Store Your Credentials

Save your network name and password in const char variables. Keeping them near the top makes them easy to update later.

const char* ssid = "MyNetwork";
const char* password = "secret123";

SSID Is the Network Name

The SSID is simply the WiFi name you tap on your phone. It must match exactly, including capital letters and spaces.

Set the Mode

Tell the chip to act as a client with WiFi.mode(). Setting station mode keeps it from accidentally becoming its own hotspot.

WiFi.mode(WIFI_STA);

Start the Connection

Kick things off with WiFi.begin(), passing your ssid and password. This starts the handshake with the router.

WiFi.begin(ssid, password);

Connecting Takes Time

Joining is not instant. You wait in a loop and check WiFi.status() until it reports WL_CONNECTED.

while (WiFi.status() != WL_CONNECTED) {
  delay(500);
  Serial.print(".");
}

Show Progress Dots

Printing a dot each loop gives friendly feedback. When the dots stop, your board has successfully joined the network.

Grab Your IP Address

Once connected, the router hands your board an IP address. Read it with WiFi.localIP() so you know how to reach the device.

Serial.println(WiFi.localIP());

The IP Identifies the Device

That IP address is your board's home on the network. You type it in a browser later to open pages your ESP serves.

When It Will Not Connect

Stuck on dots forever? Double-check the password and SSID, and remember ESP boards only join 2.4 GHz networks, not 5 GHz.

Quick Check

After WiFi.begin runs, how do you confirm the board actually joined the network?

Recap

You joined a router in Station mode: include WiFi, set credentials, call begin, wait for WL_CONNECTED, then print your IP. 🎉

Häufig gestellte Fragen

Ist die Lektion „Im Stationsmodus mit WiFi verbinden“ kostenlos?

Ja — der vollständige Text von „Im Stationsmodus mit WiFi verbinden“ ist hier im Web kostenlos zu lesen. Um sie interaktiv zu üben (integrierter Code-Editor und 24/7 KI-Tutor) und den Rest des Arduino & IoT Academy-Kurses freizuschalten, upgrade auf CoddyKit PRO. Der Arduino & IoT Academy-Kurs umfasst insgesamt 4 Lektionen.

Was lerne ich in „Im Stationsmodus mit WiFi verbinden“?

Verbinden Sie sich mit Ihrem Netzwerk und geben Sie die IP-Adresse aus. Du übst Arduino & IoT Academy mit praktischem Code, den du direkt im Browser ausführst, und ein 24/7 KI-Tutor beantwortet deine Fragen während du die Lektion bearbeitest.

Brauche ich Erfahrung, um Arduino & IoT Academy zu starten?

Keine Vorkenntnisse erforderlich. Arduino & IoT Academy auf CoddyKit ist für Anfänger bis fortgeschrittene Lernende strukturiert, sodass du hier starten oder von Anfang an beginnen und in deinem eigenen Tempo voranschreiten kannst. Dies ist Lektion 3 von 4.

Wie lange dauert die Lektion „Im Stationsmodus mit WiFi verbinden“?

Die meisten CoddyKit-Lektionen dauern etwa 5–10 Minuten. Jede ist kompakt und interaktiv, sodass du stetig Fortschritte machst und genau dort weitermachst, wo du aufgehört hast – im Web und in der App.

Kann ich in dieser Arduino & IoT Academy-Lektion Code schreiben und ausführen?

Ja. Jede Arduino & IoT Academy-Lektion enthält einen integrierten Code-Editor, sodass du echten Code direkt in deinem Browser schreibst und ausführst und sofort KI-Feedback erhältst — ohne lokale Einrichtung erforderlich.

Alle Lektionen in diesem Kurs

  1. Warum ESP32 und ESP8266 für IoT
  2. ESP-Boards zur IDE hinzufügen
  3. Im Stationsmodus mit WiFi verbinden
  4. Eine Einrichtungsseite für den Access Point bereitstellen
← Zurück zu Arduino & IoT Academy