STEP 1 / 6ESP + IOT

How to Make Two ESP8266 Talk

The goal of this project is for you to get two ESP8266 boards to communicate with one another. How does it operate? You are going to configure one ESP to function as an Access Point (Serv…

Circuit Atlas themed schematic for How to Make Two ESP8266 Talk
PROJECT#441
TRACKIoT
PARTS04
STAGES06
STEP 1 / 6 · Overview

Know the mission before touching a wire.

Understand what you are making, prepare the right tools, and make the workbench safe.

01

Project details

How to Make Two ESP8266 Talk is a iot project. The goal of this project is for you to get two ESP8266 boards to communicate with one another. How does it operate? You are going to configure one ESP to function as an Access Point (Serv…

Source pages
1104-1109
Named parts
4
Build goal
Working, tested prototype
02

Tools you need

  • Digital multimeter
  • Wire stripper and side cutters
  • Soldering iron with a fine tip
  • Current-limited bench supply
  • Computer with a data-capable USB cable

Use eye protection, good lighting, and a clean insulated surface throughout the build.

03

Safety precautions

  • Disconnect every power source before changing a connection.
  • Check component polarity, pinout, and supply voltage twice.
  • Use a current limit for the first power-up.
  • Keep liquids, loose metal, and uninsulated wires away from the bench.
Ready to continue?
STEP 2 / 6 · Parts library

Gather, identify, and understand every part.

Use the standardized inventory, then open What's this? to learn each part's role, advantages, limitations, handling, and specifications.

NAMED PROJECT INVENTORY4 PART LINES
PARTTYPEQTYREADY
MESP8266MODULE1
What's this?Image, role, pros, cons, handling & specifications
Circuit Atlas themed schematic for How to Make Two ESP8266 TalkMODULE LEARNING VIEW

ESP8266

A programmable controller that reads inputs, makes decisions, and drives the project's outputs.

What it does here

It is the control centre and must use the documented board, pin map, supply, and logic level.

Buy / compare this part

Advantages

  • Reprogrammable and reusable
  • Large learning ecosystem
  • Complex behaviour remains changeable

Limitations

  • GPIO voltage and current are limited
  • Some pins affect boot or communication
  • Loads normally need a driver

Handling

  • Disconnect power before rewiring
  • Avoid static discharge
  • Never power motors, relays, or pumps directly from GPIO

Specifications to verify

  • Use the exact model, value, package, and rating listed for ESP8266; similar-looking parts are not always interchangeable.
  • Confirm operating voltage, logic level, pinout, memory, USB interface, and maximum GPIO current.
MNodeMCUMODULE1
What's this?Image, role, pros, cons, handling & specifications
NodeMCU ESP8266 development boardMODULE LEARNING VIEW

NodeMCU

A programmable controller that reads inputs, makes decisions, and drives the project's outputs.

What it does here

It is the control centre and must use the documented board, pin map, supply, and logic level.

Buy / compare this part

Advantages

  • Reprogrammable and reusable
  • Large learning ecosystem
  • Complex behaviour remains changeable

Limitations

  • GPIO voltage and current are limited
  • Some pins affect boot or communication
  • Loads normally need a driver

Handling

  • Disconnect power before rewiring
  • Avoid static discharge
  • Never power motors, relays, or pumps directly from GPIO

Specifications to verify

  • Use the exact model, value, package, and rating listed for NodeMCU; similar-looking parts are not always interchangeable.
  • Confirm operating voltage, logic level, pinout, memory, USB interface, and maximum GPIO current.
PNEWLYPART1
What's this?Image, role, pros, cons, handling & specifications
Circuit Atlas themed schematic for How to Make Two ESP8266 TalkPART LEARNING VIEW

NEWLY

A named project component whose exact role is defined by the source circuit and build guide.

What it does here

It performs a documented electrical, control, interface, or construction function in this project.

Buy / compare this part

Advantages

  • Selected for this project
  • Can be checked independently
  • Supports modular troubleshooting

Limitations

  • Substitutes may differ
  • Generic names can hide variants
  • Pinouts and ratings vary

Handling

  • Compare the received part with the source
  • Keep it labelled
  • Do not force connectors or adjusters

Specifications to verify

  • Use the exact model, value, package, and rating listed for NEWLY; similar-looking parts are not always interchangeable.
  • Confirm dimensions, ratings, connection method, polarity, and environmental limits.
MESP8266-01 - controller board / ICMODULE1
What's this?Image, role, pros, cons, handling & specifications
Circuit Atlas themed schematic for How to Make Two ESP8266 TalkMODULE LEARNING VIEW

ESP8266-01 - controller board / IC

A programmable controller that reads inputs, makes decisions, and drives the project's outputs.

What it does here

It is the control centre and must use the documented board, pin map, supply, and logic level.

Buy / compare this part

Advantages

  • Reprogrammable and reusable
  • Large learning ecosystem
  • Complex behaviour remains changeable

Limitations

  • GPIO voltage and current are limited
  • Some pins affect boot or communication
  • Loads normally need a driver

Handling

  • Disconnect power before rewiring
  • Avoid static discharge
  • Never power motors, relays, or pumps directly from GPIO

Specifications to verify

  • Use the exact model, value, package, and rating listed for ESP8266-01 - controller board / IC; similar-looking parts are not always interchangeable.
  • Confirm operating voltage, logic level, pinout, memory, USB interface, and maximum GPIO current.
Ready to continue?
STEP 4 / 6 · Source code

Confirm the hardware-only control path.

This project does not include firmware in the source. The circuit itself provides the required behaviour.

01

How to connect

  1. Match every controller label to the circuit view and source pin map.
  2. Join grounds before signal wires when separate low-voltage supplies are used.
  3. Keep motors, relays, pumps, and other loads on a suitable driver and external supply.

Common mistakes

Reversed VCC/GND, board-label versus GPIO-number confusion, missing common ground, and charge-only USB cables.

Troubleshoot

Disconnect loads, continuity-test one path at a time, then test with a current limit.

02

Software preparation

No IDE, board package, library, or firmware upload is required for this project.

If you add a programmable controller as an extension, document its pin map separately.

03

How to upload code

The original design is implemented entirely in hardware, so proceed after verifying the circuit and supply.

Ready to continue?
STEP 5 / 6 · Build

Assemble, deploy, test, and troubleshoot.

Use the complete source notes in build order, then pass the final checks before calling the project finished.

ASSEMBLY

Build in functional stages

  • Power and regulation
  • Controller or processing stage
  • Inputs and sensors
  • Outputs and loads
  • Enclosure and strain relief
TEST

Power up safely

  • Inspect unpowered continuity first
  • Apply the lowest safe current limit
  • Measure supply rails before signals
  • Add one load at a time
  • Record expected and actual results
TROUBLESHOOT

Work from simple to complex

  • Confirm power, ground, polarity, and orientation
  • Compare each pin with the source
  • Test inputs separately from outputs
  • Replace only one variable at a time
  • Power off before every correction
PROJECT-SPECIFIC BUILD NOTES

Follow the documented instructions.

These notes come from this project's source and remain in their original order.

01

Project overview

Project build note

The goal of this project is for you to get two ESP8266 boards to communicate with one another.

How does it operate? You are going to configure one ESP to function as an Access Point (Server), and the other ESP is going to be configured to function as a Station (Client). After that, they will set up a wireless communication, and the Client will communicate with the Server by sending a message that says "Hello World!"

02

Parts List

Project build note

The following items make up the hardware that you will need to finish this

03

project

Project build note

ESP8266-01 and FTDI programmer Schematics (3.3V FTDI Programmer) (3.3V FTDI Programmer) The blueprints for this project don't require much interpretation at all. In order to upload some code, all that is required of you is to establish a serial communication link between your FTDI programmer and your ESP8266. (The diagrams for the Client and the Server are presented below in identical fashion.) Downloading ESPlorer It is strongly suggested that you make use of the ESPlorer program that was developed by 4refr0nt in order to generate and store Lua files into your ESP8266. Get ESPlorer by clicking here.

Do not compress that folder. Navigate to the primary file folder. Run ESPlorer.jar. Because it is a JAVA program, you will need to ensure that you have JAVA installed on your computer. Activate the ESPlorer. Writing Your Server Script Don't forget that the first thing you need to do is flash the NodeMCU firmware onto both of your ESPs. Simply copy the code below and then paste it into ESPlorer. -- Rui Santos -- Complete project details at https : //randomnerdtutorials.com -- ESP8266 Server

print ( "ESP8266 Server" ) wifi . setmode ( wifi . STATIONAP ); wifi . ap . config ({ ssid = "test" , pwd = "12345678" }); print ( "Server IP Address:" , wifi . ap . getip ())

sv = net . createServer ( net . TCP ) sv : listen ( 80 , function ( conn ) conn : on ( "receive" , function ( conn , receivedData ) print ( "Received Data: " .. receivedData ) end ) conn : on ( "sent" , function ( conn ) collectgarbage () end ) end ) The ESP Server can also function as an access point, and it has its own unique SSID (which is "test") and password (which is "12345678"). The server maintains a state of continuous listening for a connection, and when it

successfully establishes a connection and receives a message, it prints that string on the serial monitor. Uploading Your Lua Script When you open the ESPlorer, you should see a window that looks very much like the one in the previous figure. If you want to send commands to

04

your ESP8266, follow these instructions

Project build note

Establish a connection between your computer and the FTDI programmer. Bad raunch should be set as 9600. Choose the appropriate port for your FTDI programmer (COM3, for example) Use the Open/Close button. Choose the tab labeled "NodeMCU+MicroPtyhon." Make a copy of your Lua script and paste it into ESPlorer. The next step is to click the button labeled "Save to ESP," and give the newly created file the name "init.lua." Everything in the following figure

that you need to be concerned about or adjust is highlighted in red and can be found in the box in before image. Writing Your Client Script Having NodeMCU installed on your ESP after it has been flashed. Simply copy the code below and then paste it into ESPlorer. The ESP Client functions as a Station, and as such, it is consistently searching for an Access Point to connect to. Once it has located the Server, the Client will initiate communication by sending out "Hello World!" messages at regular intervals of five seconds each. -- Rui Santos -- Complete project details at https : //randomnerdtutorials.com -- ESP8266 Client

print ( "ESP8266 Client" ) wifi . sta . disconnect () wifi . setmode ( wifi . STATION ) wifi . sta . config ( "test" , "12345678" ) -- connecting to server wifi . sta . connect () print ( "Looking for a connection" )

tmr . alarm ( 1 , 2000 , 1 , function () if ( wifi . sta . getip () ~= nil ) then tmr . stop ( 1 ) print ( "Connected!" ) print ( "Client IP Address:" , wifi . sta . getip ()) cl = net . createConnection ( net . TCP , 0 ) cl : connect ( 80 , "192.168.4.1" ) tmr . alarm ( 2 , 5000 , 1 , function () cl : send ( "Hello World!" ) end ) else print ( "Connecting..." ) end end )

Please take note that the ESPlorer Output Window is displayed in the window on the left. In the window on the right, I'm setting up a serial communication connection with PuTTY.org.

Ready to continue?
PROJECT ACHIEVED

You built How to Make Two ESP8266 Talk.

You followed the full workflow from understanding the mission to testing the finished project. That is a real engineering achievement - well done.

ESP8266 in conjunction with Node-RED and MQTT project thumbnail featuring To construct the circuit, you will need the following components, Raspberry Pi, ESP8266 (ESP-12E Nodemcu)
NEXT IOT ADVENTURE

ESP8266 in conjunction with Node-RED and MQTT

Ready to reuse what you learned in another project from the same track?

Start this project
Browse all 500 projects