top of page

How to use WiFi Manager Library with NodeMCU?

Updated: Feb 13

The Internet of Things ( IoT) aims towards making life simpler by automating every small task around us. Many scientists are estimating that around 1.8 billion IoT devices will come up by the end of the year 2022. Hence, most of the engineers are interested in this domain, supporting to which there are numerous development boards to enable quick IoT prototyping. The most popular development boards used in IoT projects include Arduino, Raspberry Pi, and Esp8266. You can check out some latest IoT projects in this section.


In the case of IoT prototyping, devices can be connected to the internet by changing the WiFi SSID and password in the code. But when the device is handed over to the user, they should be able to connect to their Wi-Fi network without changing the hardcode. This is where a WiFi Manager helps. It allows you to connect your devices to different Access Points without changing the WiFi credentials. So, let us learn How to use WiFi Manager with NodeMCU.



Hardware Requirements:


The following hardware components are required to perform this task -


NodeMCU ESP8266 :

NodeMCU Esp8266
NodeMCU Esp8266

ESP8266 is a low-cost microcontroller chip that is used to interface various hardware components. It has inbuilt #WiFi and Bluetooth capabilities, making it a better candidate for IoT projects and Developments. Also, it is very cost-efficient as well as consumes less power. It allows us to use it as a micro-controller and manipulate input and output.


Buy Esp8266 from here.


USB Cable :

USB Cable
USB Cable

USB ( Universal Serial Bus ) Cable is used to connect the #development boards ( NodeMCU in this case ) to the system ( For eg: Laptops ).


Buy USB Cable from here.



Software Requirement:


Arduino IDE :

Arduino IDE
Arduino IDE

Arduino Integrated Development Environment ( #IDE ) is open-source software that facilitates the development and uploading of codes to the microcontroller. Program written in Arduino IDE is known as Sketch. These Sketch files are saved with the file extension ino.


Click on the link to download the software.


Installing WiFi Manager Library :


  1. Click here to download the WiFi Manager Library.

  2. Go to Code > Download ZIP.

  3. Open Arduino IDE > Sketch > Add .ZIP Library.

  4. Select the. ZIP file that you just downloaded.

  5. A message will get displayed on the screen saying " A library named WiFi manager successfully installed ".


Code :




NodeMCU WiFi Manager Working :


Once the code is written in the #ArduinoIDE, connect the ESP8266 board to the system via USB cable. Now, upload the code to the board and then run the program.


When the user uses a new #Wi-Fi connection on the system, he/she will be directed to a webpage as shown below.

WiFi Manager
WiFi Manager

Here, the user can configure a new #SSID and password. Then it tries to form a connection, and if the connection is established successfully, a message will be displayed in the serial monitor " connected...yeey :) ".


Check the Project working video here - How to use WifiManager Library with NodeMCu

Video By - Harshit Gupta



Conclusion :


A WiFi #Manager manages wireless connections in your IoT devices by allowing users to connect to their own WiFi networks without changing the hardcode. Also, it allows you to manage multiple SSID connections. The WiFi Manager Library is a great library to add to your #IoT projects.

 

NodeMCU Projects :


Related Posts

See All
bottom of page