NodeMCU ESP32 | #1 WiFi Configuration

This is #1 tutorial on how to do wifi configuration with nodemcu ESP32, Some function are usable for another mcu like ESP8266. and here is the code :

#include <Arduino.h>
#include <WiFi.h>

String wifiSSID = "smartbuilding_wifi";
String wifiPassword = "smartbuilding@2020";
String targetIp = "www.google.com";

void setup()
{
    Serial.begin(9600);
    Serial.println("Connecting To Wifi");

    WiFi.begin(wifiSSID.c_str(), wifiPassword.c_str());
    while (WiFi.status() != WL_CONNECTED)
    {
        Serial.print(".");
        delay(500);
    }

    Serial.println("Wifi Connected");
    Serial.println(WiFi.SSID());
    Serial.println(WiFi.RSSI());
    Serial.println(WiFi.macAddress());
    Serial.println(WiFi.localIP());
    Serial.println(WiFi.gatewayIP());
    Serial.println(WiFi.dnsIP());
}

void loop()
{

    // put your main code here, to run repeatedly:
}

For more detail please visit us on youtube

Leave a Reply

Your email address will not be published. Required fields are marked *