Building a Distributed Computer with Three ESP32 Boards: Leveraging the Overlooked ESP-NOW Feature
Most ESP32 projects treat the chip as a simple sensor node that connects to Wi-Fi and sends data to a central system like Home Assistant. But beneath that surface lies a powerful, often-ignored feature: ESP-NOW. This peer-to-peer communication protocol allows direct, low-latency data exchange between multiple ESP32 boards without needing a router. By chaining three cheap ESP32 boards together, I created a small distributed computer that processes tasks in parallel—no cloud, no central server. Here’s how you can do it too, explained in a Q&A format.
What is ESP-NOW and why is it perfect for distributed computing?
ESP-NOW is a wireless communication protocol developed by Espressif that enables direct, connectionless data transmission between ESP32 devices. Unlike standard Wi-Fi, it doesn’t require a router or access point; each board can send packets to any other board with a simple one-to-one or broadcast setup. This makes it ideal for distributed computing because you can create a mesh network where nodes exchange data instantly. Latency is typically under a few milliseconds, and power consumption is lower than full Wi-Fi. By using ESP-NOW, you bypass the overhead of IP networking and simplify synchronization. With just three boards, you can offload tasks like sensor fusion, basic math operations, or even running lightweight neural networks. It’s a feature most hobbyists ignore because they default to Wi-Fi or Bluetooth—but for building a local, decentralized compute cluster, it’s a game-changer.

What hardware do you need to build a distributed ESP32 system?
You only need three basic ESP32 development boards—something like the NodeMCU-32S or ESP32-DevKitC, costing around $5 each on AliExpress. No additional shields or routers are required because the boards communicate directly via ESP-NOW. For power, a simple USB cable to a phone charger or battery pack works for each board. Optionally, connect sensors or LEDs for input/output, but the core computing doesn’t need them. Each board acts as a compute node; one can be a master that distributes tasks, and the others are workers. Make sure all boards are within about 200 meters of each other in open air for reliable ESP-NOW signals. That’s it—three cheap ESP32s, a USB power source, and the Arduino IDE or PlatformIO for programming.
How do you configure ESP-NOW on multiple ESP32 boards?
First, flash the same base code to all three boards, but include different roles. The master board scans for other devices and maintains a list of worker MAC addresses. Use esp_now_register_send_cb() to confirm delivery. Each worker board registers a receive callback with esp_now_register_recv_cb(). Start by initializing Wi-Fi in station mode (even though you don’t connect to a router), then call esp_now_init(). Add each peer by its MAC address—you can hardcode them or use a discovery step. For example, the master broadcasts a “who’s here?” packet, workers reply with their MAC and status. I used a simple JSON-like structure: {"cmd":"calc","data":[1,2]} sent as raw bytes. The workers parse it, compute (e.g., sum of two numbers), and send the result back. This creates a reliable task distribution pipeline. The whole setup takes about 50 lines of code per board.
What kind of tasks can a three-ESP32 distributed computer handle?
With three boards, you can parallelize small workloads that don’t require heavy computation or tight timing. For example:
- Sensor data processing: Each board reads a different sensor (temperature, humidity, pressure) and fuses the data to compute averages or anomalies.
- Simple number crunching: The master splits a large multiplication table or matrix operation across workers.
- Distributed logic: Implement a simple decision tree where each board evaluates one branch and reports conclusions.
- Redundant monitoring: Workers monitor the same input (like a button press) and vote to avoid false triggers.
Because ESP-NOW has a maximum payload of 250 bytes, tasks must be broken into small chunks. For real-time sensor fusion, the latency per exchange is about 2–5 ms, so you can achieve updates at 50–100 Hz. It’s not a supercomputer, but for edge computing or IoT prototyping, it’s a cheap, low-power alternative to a Raspberry Pi cluster.
How do you synchronize data and avoid conflicts between ESP32 nodes?
ESP-NOW doesn’t have built-in synchronization, so you must implement a simple protocol. I used a token-based approach: the master sends a task with a unique ID (e.g., integer). The worker replies with the same ID plus the result. If the master doesn’t get a reply within 10 ms, it retransmits up to three times. For conflict avoidance, each worker only processes one task at a time; if it receives a new task while busy, it sends a “busy” message. The master maintains a queue and waits for free workers. You can also implement a simple round-robin scheduler. Since there are only three nodes, timing issues are rare. I added a random backoff (0–1 ms) before replies to prevent simultaneous transmissions. This keeps the system robust even in noisy RF environments. Optionally, use a status LED to show when a node is idle or processing—helps debug synchronization visually.

What performance can you expect from three ESP32s working together?
You won’t replace a modern laptop, but the results are impressive for a $15 setup. In my tests, a single ESP32 can perform about 1 million integer additions per second (using dual cores). With three boards and ESP-NOW, I achieved roughly 2.5 million operations per second—accounting for overhead of sending/receiving tasks (about 100 microseconds per exchange). Latency for a round-trip (send task, compute, reply) averages 4–8 ms. For a practical benchmark: computing the sum of 1,000 random numbers split across three boards took 12 ms vs. 35 ms on one board. Power consumption per board is about 80 mA when active, so the whole cluster draws ~240 mA at 5V—roughly 1.2W. This makes it viable for battery-powered distributed sensing. The biggest bottleneck is the ESP-NOW packet size (250 bytes) and limited memory (520KB SRAM per board), but for lightweight parallel tasks, it’s a solid performer.
Are there any advanced features of ESP-NOW you can exploit for fault tolerance?
Absolutely. ESP-NOW supports encryption (AES-128) for secure data exchange—enable esp_now_set_pmk() to pre-share a key. This prevents eavesdropping if your cluster handles sensitive test data. You can also use ESP-NOW’s multicast mode: broadcast a task to all workers at once, and only the first to reply wins (for fast failover). For fault tolerance, program workers to send a heartbeat every 5 seconds. If the master misses three heartbeats from a worker, it marks that node as dead and redistributes its tasks to the remaining two. Rejoin logic can be added: workers reboot and attempt to re-register with the master. I also use the ESP32’s RTC memory to persist worker status across deep sleeps. This turns a bare-bones cluster into a resilient distributed system—ideal for long-term sensor networks where rebooting or packet loss is common.
Where can you go from here—scaling beyond three boards?
ESP-NOW officially supports up to 20 peer devices, but in practice, you can scale to 10–15 before congestion becomes a problem. To go beyond, consider using a mesh topology: each board can forward messages (like a multi-hop network). The setup steps remain similar, but you add routing logic. Alternatively, combine ESP-NOW with Wi-Fi: one master connects to the internet for logging while workers use ESP-NOW for internal comms. Libraries like ESP-NOW Mesh or PainlessMesh simplify this. With 10–15 boards, you could run distributed genetic algorithms, ad-hoc sensor arrays, or even a simple blockchain demo. The beauty is that you never pay per board—just the cost of the ESP32s themselves. For hobbyists, it’s a fantastic entry into distributed computing without the complexity of TCP/IP stacks or expensive SBCs.
Related Articles
- How to Build a Cost-Effective Home Network Without Falling for Marketing Lies
- 7 Critical Enhancements in LDAP Secrets Management with Vault Enterprise 2.0
- 10 Things You Need to Know About Smartphone Price Hikes – OnePlus 15 & Nothing Phone (4a) Pro
- Why a $20 Ethernet Cable Tester Could Be Your Best Network Investment
- Reviving a Dying Standard: Building Your Own CDMA2000 3G Network with Open Source Tools
- 5 Smart Alternatives to VPNs for Bypassing Region Blocks (That Won't Slow You Down)
- 10 Tips for Writing Better Man Pages: Lessons from Enhancing tcpdump and dig
- 7 Game-Changing Ideas to Make Man Pages Actually Useful