- Learning about the WiFi Mesh working
- Visualize interaction between nodes
- NodeMCU ( quantity: 2 nos)
- Breadboard (quantity: 2 nos)
- Micro USB cable (quantity: 2 nos)
- Arduino IDE on your computer
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
- First, set up the NodeMCUs
- Connect the NodeMCU with the computer.
- Upload the program in the first NodeMCU. The node ID can be viewed in the serial monitor.
- Repeat this for all NodeMCUs you intend to use in the network.
- 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.
- We can extend this network by adding more nodes.
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.