top of page

Learn to find the IP Address of NodeMCU

In this section learn to find the IP Address of a NodeMCU on the serial monitor of Arduino IDE

Description:

Finding the IP address of your NodeMCU is a crucial step in many IoT projects. Here’s a simple guide to help you obtain the IP address using the Arduino IDE and Serial Monitor.


Step 1: Install the Necessary Software

1. Arduino IDE: Ensure you have the Arduino IDE installed on your computer. You can download it from the [Arduino website](https://www.arduino.cc/en/software).

2. ESP8266 Board Manager: Open the Arduino IDE, go to File > Preferences. In the “Additional Board Manager URLs” field, add the following URL: `http://arduino.esp8266.com/stable/package_esp8266com_index.json`. Then, go to Tools > Board > Boards Manager, search for `ESP8266`, and install the package.


Step 2: Connect Your NodeMCU

1. USB Connection: Connect your NodeMCU to your computer using a USB cable.

2. Select Board and Port: In the Arduino IDE, go to Tools > Board and select `NodeMCU 1.0 (ESP-12E Module)`. Then, go to Tools > Port and select the appropriate COM port your NodeMCU is connected to.


Step 3: Write the Code

Here is a simple code example to connect your NodeMCU to a Wi-Fi network and print its IP address:``

1. Enter WiFi Credentials: Replace `your_SSID` and `your_PASSWORD` with your Wi-Fi network’s SSID and password.

2. Upload the Code: Click the upload button in the Arduino IDE to upload the code to your NodeMCU.


Step 4: Open Serial Monitor

1. Open Serial Monitor: Once the code is uploaded, open the Serial Monitor by going to Tools > Serial Monitor in the Arduino IDE or by pressing `Ctrl + Shift + M`.

2. Set Baud Rate: Ensure the baud rate is set to `115200` in the Serial Monitor (matching the `Serial.begin(115200)` in the code).


Step 5: View IP Address

1. Monitor Output: After opening the Serial Monitor, you should see a series of messages indicating the connection process. Once connected, the Serial Monitor will display the IP address assigned to your NodeMCU by the Wi-Fi network.

Project Gallery

All Documents :


#include <ESP8266WiFi.h>

const char* ssid = "your_SSID";       // Replace with your WiFi SSID

const char* password = "your_PASSWORD"; // Replace with your WiFi Password

void setup() {

  Serial.begin(115200);          // Start the Serial communication at 115200 baud

  WiFi.begin(ssid, password);    // Connect to Wi-Fi network

  Serial.print("Connecting to ");

  Serial.print(ssid);

  

  while (WiFi.status() != WL_CONNECTED) {

    delay(1000);

    Serial.print(".");

  }

  Serial.println();

  Serial.println("WiFi connected!");

  Serial.print("IP address: ");

  Serial.println(WiFi.localIP()); // Print the IP address

}

void loop() {

  // Your code here

}

Click Here to Download

Video Tutorial :

Conclusion :

By following these steps, you can easily find the IP address of your NodeMCU using the Serial Monitor in the Arduino IDE. This IP address is essential for various IoT applications, such as accessing your NodeMCU via a web browser or communicating with it over a network. For more checkout our website and enhance your skills at Skill-Hub by EmbeddedBrew. Happy learning!

Comments

Share Your ThoughtsBe the first to write a comment.
bottom of page