Login

Wifi-Mesh using NodeMCU

Objectives

  • Learning about the WiFi Mesh working
  • Visualize interaction between nodes

Things

  1. NodeMCU ( quantity: 2 nos)
  2. Breadboard (quantity: 2 nos)
  3. Micro USB cable (quantity: 2 nos)
  4. Arduino IDE on your computer

Let’s Begin!

ESP8266 chip is capable of WiFi Mesh networking. In a mesh network, nodes can self organize and dynamically talk to each other. Any node in that network is able to transmit data packets to any other node, within range, which can then forward data packets through the network to the final destination. Each NodeMCU acts as a node in the Mesh Network.

A WiFi mesh connection requires a multitude of modules as well as wireless router. To share internet access in a WiFi mesh network, only one node needs to be physically wired to a network connection. That one wired node then shares its Internet connection wirelessly with all other nodes in its vicinity.

Setting up the connection

  1. First, set up the NodeMCUs
  2. Connect the NodeMCU with the computer.
  3. Upload the program in the first NodeMCU. The node ID can be viewed in the serial monitor.
  4. Repeat this for all NodeMCUs you intend to use in the network.
  5. With one NodeMCU connected to your computer and all other NodeMCUs powered, open the serial monitor of the Arduino IDE, where you can view the request from all the NodeMCUs along with their node IDs.
  6. We can extend this network by adding more nodes.

Final Code

To copy the code, right click on view raw at the bottom of the code, click on open link in new tab and then copy the code.

Upload the code

Step 1:  Enter the final code in the Arduino IDE window.

Step 2: Compile/ verify the code by clicking on the verify button.

Step 3: Upload the code by clicking on the upload button, which is right next to the verify button.

Step 4: If you encounter any errors, you need to go back to the code and fix the errors. Check if the correct board and               port is selected.

We would love to see what you build out of these learnings!

Click here to submit your projects, share it with the world and stand a chance to be rewarded.

top

Knowledge and Content by Li2 Technologies | © 2021 NASSCOM Foundation | All rights reserved

X