What You’ll Need:
- A Wi-Fi router (2.4GHz) with its SSID and password.
- An ESP8266 board configured with the Arduino IDE.
#include <ESP8266WiFi.h>
const char* ssid = "YOUR_WIFI_SSID"; // Replace with your network name
const char* password = "YOUR_WIFI_PASS"; // Replace with your network password
void setup() {
Serial.begin(115200);
Serial.println();
Serial.printf("Connecting to %s\n", ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("\nConnected to Wi-Fi!");
Serial.printf("IP Address: %s\n", WiFi.localIP().toString().c_str());
}
void loop() {
}
ESP-01 NodeMCU
19 Nov. 2024
|
Last Updated: 22 Nov. 2025
|
jaimedcsilva Related