This tutorial of Robo India is a basic tutorial to connect a NodeMCU wifi module to the internet. This tutorial is based on Arduino IDE.
1. Introduction:
This tutorial explains how to connect a NodeMCU wifi development board to the internet. It connects to the internet through a wifi network.
1.2 Hardware required
S.No. | Item | Quantity |
1 | NodeMCU | 1 |
2. | Micro USB cable | 1 |
2. Building Circuit
No circuit is required to run this tutorial. Just plug USB cable to the NodeMCU, upload the code provided here in this tutorial and its done.
3. Programming:
Here is the code to run this circuit on NodeMCU.
You may download this code (Arduino Sketch) from here.
#include <ESP8266WiFi.h> const char *ssid = "Your wifi Network name"; // replace with your wifi ssid and wpa2 key const char *pass = "Network password"; WiFiClient client; void setup() { Serial.begin(9600); delay(10); Serial.println("Connecting to "); Serial.println(ssid); WiFi.begin(ssid, pass); while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); } Serial.println(""); Serial.println("WiFi connected"); } void loop() { }
4. Output
Output of this project is seen on serial monitor. Open serial monitor after uploading the code. Output is seen there.
If you have any query please write us at support@roboindia.com
Thanks and Regards
Content Development Team
Robo India
https://roboindia.com
My output only shows
“Connecting to (ssid)
…………………………………….” and so on with the dots.
Hello
Please check the SSID and password, you might have entered wrong.
I used above program but Node MCU is not getting connected to Wifi network. Getting an error ” Leaving
Hard resetting via RTS pin”
Looks correct. I enabled hot spot in my mobile…My computer is getting connected but node MCU not getting connected.
My output is also on serial port is
ssid…………………….