{"id":173214,"date":"2026-01-22T14:44:53","date_gmt":"2026-01-22T14:44:53","guid":{"rendered":"https:\/\/randomnerdtutorials.com\/?p=173214"},"modified":"2026-01-22T15:04:47","modified_gmt":"2026-01-22T15:04:47","slug":"micropython-esp-now-esp32-one-to-many","status":"publish","type":"post","link":"https:\/\/randomnerdtutorials.com\/micropython-esp-now-esp32-one-to-many\/","title":{"rendered":"MicroPython: ESP-NOW with ESP32 &#8211; Control Multiple Boards (One to Many)"},"content":{"rendered":"\n<p>In this guide, you\u2019ll learn how to use ESP-NOW to control multiple ESP32 boards from a single ESP32 main controller (one-to-many setup). Think of it like a remote control that sends commands to several devices. We\u2019ll show you how to set up one ESP32 board to wirelessly control three other boards using the ESP-NOW communication protocol\u2014perfect for home automation, sensor networks, or projects involving multiple IoT devices.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" width=\"1200\" height=\"675\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/07\/ESP-NOW-MicroPython-One-to-Many.jpg?resize=1200%2C675&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"MicroPython ESP-NOW with ESP32 Control Multiple Boards One to Many\" class=\"wp-image-173279\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/07\/ESP-NOW-MicroPython-One-to-Many.jpg?w=1920&amp;quality=100&amp;strip=all&amp;ssl=1 1920w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/07\/ESP-NOW-MicroPython-One-to-Many.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/07\/ESP-NOW-MicroPython-One-to-Many.jpg?resize=1024%2C576&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/07\/ESP-NOW-MicroPython-One-to-Many.jpg?resize=768%2C432&amp;quality=100&amp;strip=all&amp;ssl=1 768w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/07\/ESP-NOW-MicroPython-One-to-Many.jpg?resize=1536%2C864&amp;quality=100&amp;strip=all&amp;ssl=1 1536w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/figure><\/div>\n\n\n<p class=\"rntbox rntclgreen\"><strong>Using Arduino IDE?<\/strong> Follow this tutorial instead: <a href=\"https:\/\/randomnerdtutorials.com\/esp-now-one-to-many-esp32-esp8266\/\" title=\"\">ESP-NOW with ESP32: Send Data to Multiple Boards (one-to-many)<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites &#8211; MicroPython Firmware<\/h2>\n\n\n\n<p>To follow this tutorial, you need MicroPython firmware installed on your ESP32 or ESP8266 boards. You also need an IDE to write and upload the code to your board. We suggest using Thonny IDE:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/randomnerdtutorials.com\/getting-started-thonny-micropython-python-ide-esp32-esp8266\/\">Installing and getting started with Thonny IDE<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/flashing-micropython-firmware-esptool-py-esp32-esp8266\/\">Flashing MicroPython Firmware with esptool.py<\/a><\/li>\n<\/ul>\n\n\n\n<p class=\"rntbox rntclblue\"><strong>New to MicroPython?<\/strong> Check out our eBook: <a href=\"https:\/\/randomnerdtutorials.com\/micropython-programming-with-esp32-and-esp8266\/\" title=\"\">MicroPython Programming with ESP32 and ESP8266 eBook (2nd Edition)<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"esp-now-intro\">Introducing ESP-NOW<\/h2>\n\n\n\n<p>ESP-NOW is a wireless communication protocol developed by Espressif that allows multiple ESP32 or ESP8266 boards to exchange small amounts of data without using Wi-Fi or Bluetooth. ESP-NOW does not require a full Wi-Fi connection (though the Wi-Fi controller must be turned on), making it ideal for low-power and low-latency applications like sensor networks, remote controls, or data exchange between boards.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-medium\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"300\" height=\"75\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/esp-now-logo.png?resize=300%2C75&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP-NOW - ESP32 Logo\" class=\"wp-image-93360\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/esp-now-logo.png?resize=300%2C75&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/esp-now-logo.png?resize=1024%2C256&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/esp-now-logo.png?resize=768%2C192&amp;quality=100&amp;strip=all&amp;ssl=1 768w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/esp-now-logo.png?w=1280&amp;quality=100&amp;strip=all&amp;ssl=1 1280w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/figure><\/div>\n\n\n<p>ESP-NOW uses a connectionless communication model, meaning devices can send and receive data without connecting to a router or setting up an access point (unlike HTTP communication between boards). It supports unicast (sending data to a specific device using its MAC address) and broadcast (sending data to all nearby devices using a broadcast MAC address) messaging.<\/p>\n\n\n\n<p class=\"rntbox rntclgreen\"><strong>New to ESP-NOW?<\/strong> Read our getting started guide: <a href=\"https:\/\/randomnerdtutorials.com\/micropython-esp-now-esp32\/\">MicroPython: ESP-NOW with ESP32 (Getting Started)<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Project Overview<\/h2>\n\n\n\n<p>This tutorial shows how to set up an ESP32 board as an ESP-NOW main controller that sends commands to multiple ESP32 boards.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"750\" height=\"500\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/07\/ESP32-ESP-NOW-send-data-to-multiple-boards.png?resize=750%2C500&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP32 Controller Sends Data to Multiple Boards via ESP-NOW Communication Protocol\" class=\"wp-image-173411\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/07\/ESP32-ESP-NOW-send-data-to-multiple-boards.png?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/07\/ESP32-ESP-NOW-send-data-to-multiple-boards.png?resize=300%2C200&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>Here&#8217;s an overview of how the project works:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>One ESP32 board will act as a controller board that sends commands to other ESP32 boards.<\/li>\n\n\n\n<li>The controller will be connected to three pushbuttons. Each button controls an LED of one of the receiver boards.<\/li>\n\n\n\n<li>The ESP32 controller board sends messages to a specific board by referring to its MAC address.<\/li>\n\n\n\n<li>When you press the pushbutton for a particular board, it will toggle the current LED state.<\/li>\n\n\n\n<li>The ESP32 receiver boards will be listening for ESP-NOW packages. When they receive a message from the controller, they will control their corresponding LED accordingly.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Parts Required<\/h2>\n\n\n\n<p>To follow the project in this tutorial, you&#8217;ll need the following parts:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>4x (at least three) <a href=\"https:\/\/makeradvisor.com\/tools\/esp32-dev-board-wi-fi-bluetooth\/\" target=\"_blank\" rel=\"noopener\" title=\"\">ESP32 boards<\/a><\/li>\n\n\n\n<li>3x <a href=\"https:\/\/makeradvisor.com\/tools\/pushbuttons-kit\/\" target=\"_blank\" rel=\"noopener\" title=\"\">Pushbuttons<\/a><\/li>\n\n\n\n<li>3x <a href=\"https:\/\/makeradvisor.com\/tools\/3mm-5mm-leds-kit-storage-box\/\" target=\"_blank\" rel=\"noopener\" title=\"\">LEDs<\/a><\/li>\n\n\n\n<li>3x<a href=\"https:\/\/makeradvisor.com\/tools\/resistors-kits\/\" target=\"_blank\" rel=\"noopener\" title=\"\"> 220 Ohm resistors<\/a> (or similar values)<\/li>\n\n\n\n<li><a href=\"https:\/\/makeradvisor.com\/tools\/mb-102-solderless-breadboard-830-points\/\" target=\"_blank\" rel=\"noopener\" title=\"\">Breadboard<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/makeradvisor.com\/tools\/jumper-wires-kit-120-pieces\/\" target=\"_blank\" rel=\"noopener\" title=\"\">Jumper wires<\/a><\/li>\n<\/ul>\n\n\n<p>You can use the preceding links or go directly to <a href=\"https:\/\/makeradvisor.com\/tools\/?utm_source=rnt&utm_medium=post&utm_campaign=post\" target=\"_blank\">MakerAdvisor.com\/tools<\/a> to find all the parts for your projects at the best price!<\/p><p style=\"text-align:center;\"><a href=\"https:\/\/makeradvisor.com\/tools\/?utm_source=rnt&utm_medium=post&utm_campaign=post\" target=\"_blank\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/10\/header-200.png?w=1200&#038;quality=100&#038;strip=all&#038;ssl=1\"><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"get-mac-address\">ESP32: Getting Board MAC Address<\/h2>\n\n\n\n<p>To communicate via ESP-NOW, you need to know the MAC address of your boards. To get your board\u2019s MAC Address, you can copy the following code to Thonny IDE and run it on your board. <\/p>\n\n\n<pre style=\"max-height: 40em; margin-bottom: 20px;\"><code class=\"language-python\"># Rui Santos &amp; Sara Santos - Random Nerd Tutorials\r\n# Complete project details at https:\/\/RandomNerdTutorials.com\/micropython-esp-now-esp32\/\r\n \r\nimport network\r\n\r\nwlan = network.WLAN(network.STA_IF)\r\nwlan.active(True)\r\n\r\n# Get MAC address (returns bytes)\r\nmac = wlan.config('mac')\r\n\r\n# Convert to human-readable format\r\nmac_address = ':'.join('%02x' % b for b in mac)\r\n\r\nprint(&quot;MAC Address:&quot;, mac_address)<\/code><\/pre>\n\t<p style=\"text-align:center\"><a class=\"rntwhite\" href=\"https:\/\/github.com\/RuiSantosdotme\/Random-Nerd-Tutorials\/raw\/master\/Projects\/ESP-MicroPython\/esp32_get_mac_address.py\" target=\"_blank\">View raw code<\/a><\/p>\n\n\n\n<p>After running the code, it should print the board&#8217;s MAC address on the shell.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"707\" height=\"298\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/thonny-ide-get-board-mac-address.png?resize=707%2C298&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Thonny IDE - Get ESP32 Board MAC Address - MicroPython\" class=\"wp-image-170329\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/thonny-ide-get-board-mac-address.png?w=707&amp;quality=100&amp;strip=all&amp;ssl=1 707w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/thonny-ide-get-board-mac-address.png?resize=300%2C126&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 707px) 100vw, 707px\" \/><\/figure><\/div>\n\n\n<p>Get the MAC address for all of your boards.<\/p>\n\n\n\n<p>For example, in my case, I get:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Sender board<\/strong>: <span class=\"rnthl rntliteral\">24:0A:C4:31:38:5C<\/span><\/li>\n\n\n\n<li><strong>Receiver board 1<\/strong>: <span class=\"rnthl rntliteral\">DC:B8:15:81:2B:64<\/span><\/li>\n\n\n\n<li><strong>Receiver board<\/strong> <strong>2<\/strong>: <span class=\"rnthl rntliteral\">30:AE:A4:07:0D:64<\/span><\/li>\n\n\n\n<li><strong>Receiver board<\/strong> <strong>3<\/strong>: <span class=\"rnthl rntliteral\">30:AE:A4:F6:7D:4C<\/span><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Preparing the ESP32 Sender Board<\/h2>\n\n\n\n<p>The sender board will be connected to three pushbuttons. Each pushbutton will control one LED of a different ESP32.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"422\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/07\/ESP32-ESP-NOW-Controller.jpg?resize=750%2C422&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP32 ESP-NOW Controller with Three Pushbuttons\" class=\"wp-image-173272\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/07\/ESP32-ESP-NOW-Controller.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/07\/ESP32-ESP-NOW-Controller.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\">Wiring the Circuit<\/h3>\n\n\n\n<p>Start by wiring three pushbuttons to the ESP32 sender board. We&#8217;ll connect the pushbuttons to GPIOs 21, 22, and 23. You can use any other suitable GPIOs (don&#8217;t forget to <a href=\"https:\/\/randomnerdtutorials.com\/esp32-pinout-reference-gpios\/\" title=\"\">check out the ESP32 board pinout<\/a>).<\/p>\n\n\n\n<p>We&#8217;ll use the ESP32 internal pull-down resistors. So, you don&#8217;t need to add resistors to the circuit.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"908\" height=\"826\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/07\/ESP32-three-pushbuttons_bb.png?resize=908%2C826&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP32 connected to three pushbuttons - circuit diagram\" class=\"wp-image-173271\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/07\/ESP32-three-pushbuttons_bb.png?w=908&amp;quality=100&amp;strip=all&amp;ssl=1 908w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/07\/ESP32-three-pushbuttons_bb.png?resize=300%2C273&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/07\/ESP32-three-pushbuttons_bb.png?resize=768%2C699&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 908px) 100vw, 908px\" \/><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\">ESP32 ESP-NOW Controller &#8211; The Sender Code<\/h3>\n\n\n\n<p>Copy the following code to Thonny IDE.<\/p>\n\n\n<pre style=\"max-height: 40em; margin-bottom: 20px;\"><code class=\"language-python\"># Rui Santos &amp; Sara Santos - Random Nerd Tutorials\n# Complete project details at https:\/\/RandomNerdTutorials.com\/micropython-esp-now-esp32-one-to-many\/\n\nimport network\nimport aioespnow\nimport asyncio\nfrom machine import Pin\n\n# Initialize Wi-Fi in station mode\nsta = network.WLAN(network.STA_IF)\nsta.active(True)\nsta.disconnect()\n\n# Initialize AIOESPNow\ne = aioespnow.AIOESPNow()\ntry:\n    e.active(True)\nexcept OSError as err:\n    print(&quot;Failed to initialize AIOESPNow:&quot;, err)\n    raise\n\n# Define pins for pushbuttons\nbutton1_pin = Pin(21, Pin.IN, Pin.PULL_UP)  # Button for Board 1\nbutton2_pin = Pin(22, Pin.IN, Pin.PULL_UP)  # Button for Board 2\nbutton3_pin = Pin(23, Pin.IN, Pin.PULL_UP)  # Button for Board 3\n\n# Define MAC addresses for receiving boards\nboard1_mac = b'\\xff\\xff\\xff\\xff\\xff\\xff'  # MAC address for Board 1\nboard2_mac = b'\\xff\\xff\\xff\\xff\\xff\\xff'  # MAC address for Board 2\nboard3_mac = b'\\xff\\xff\\xff\\xff\\xff\\xff'  # MAC address for Board 3\n\n# Build dictionary with pin and MAC variables\nboards = {\n    1: {&quot;pin&quot;: button1_pin, &quot;mac&quot;: board1_mac},\n    2: {&quot;pin&quot;: button2_pin, &quot;mac&quot;: board2_mac},\n    3: {&quot;pin&quot;: button3_pin, &quot;mac&quot;: board3_mac}\n}\n\n# Add peers\nfor board_num, info in boards.items():\n    try:\n        e.add_peer(info[&quot;mac&quot;])\n        print(f&quot;Added Board {board_num} peer: {info['mac']}&quot;)\n    except OSError as err:\n        print(f&quot;Failed to add Board {board_num} peer: {err}&quot;)\n        raise\n\n# Async function to monitor buttons and send toggle commands\nasync def monitor_buttons(e):\n    # Track LED states (True = ON, False = OFF)\n    led_states = {1: False, 2: False, 3: False}\n    \n    while True:\n        for board_num, info in boards.items():\n            button = info[&quot;pin&quot;]\n            if button.value() == 0:  # Button pressed (active low)\n                led_states[board_num] = not led_states[board_num]  # Toggle LED\n                command = &quot;LED_ON&quot; if led_states[board_num] else &quot;LED_OFF&quot;\n                if await e.asend(info[&quot;mac&quot;], command, sync=True):\n                    print(f&quot;Board {board_num}: {command}&quot;)\n                else:\n                    print(f&quot;Board {board_num}: Failed to send&quot;)\n                await asyncio.sleep(0.3)  # Debounce delay\n        \n        await asyncio.sleep(0.1)  # Short loop delay\n\n# Main async function\nasync def main(e):\n    await monitor_buttons(e)\n\n# Run the async program\ntry:\n    asyncio.run(main(e))\nexcept KeyboardInterrupt:\n    print(&quot;Stopping...&quot;)\n    e.active(False)\n    sta.active(False)\n<\/code><\/pre>\n\t<p style=\"text-align:center\"><a class=\"rntwhite\" href=\"https:\/\/github.com\/RuiSantosdotme\/Random-Nerd-Tutorials\/raw\/master\/Projects\/ESP-MicroPython\/esp32_espnow_led_controller_sender.py\" target=\"_blank\">View raw code<\/a><\/p>\n\n\n\n<p>Make sure to modify the code with your receivers&#8217; boards&#8217; MAC addresses.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How Does the Code Work?<\/h3>\n\n\n\n<p>Let&#8217;s take a quick look at how the code works. Alternatively, you can skip to the next section.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Importing Libraries<\/h4>\n\n\n\n<p>Start by importing the required libraries. We&#8217;re using the <span class=\"rnthl rntliteral\">aioespnow<\/span> library for ESP-NOW, which is an asynchronous version of the <span class=\"rnthl rntliteral\">espnow<\/span> library.<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code>import network\nimport aioespnow\nimport asyncio\nfrom machine import Pin<\/code><\/pre>\n\n\n\n<p>If you&#8217;re new to asynchronous programming, we recommend following this guide to better understand how it works: <a href=\"https:\/\/randomnerdtutorials.com\/micropython-esp32-esp8266-asynchronous-programming\/\">MicroPython ESP32\/ESP8266 Asynchronous Programming \u2013 Run Multiple Tasks<\/a>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Initialize the Wi-Fi Interface and ESP-NOW<\/h4>\n\n\n\n<p>To use ESP-NOW, you first need to initialize the Wi-Fi interface.<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code># Initialize Wi-Fi in station mode\nsta = network.WLAN(network.STA_IF)\nsta.active(True)\nsta.disconnect()<\/code><\/pre>\n\n\n\n<p>Then, you can initialize ESP-NOW communication protocol<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code># Initialize AIOESPNow\ne = aioespnow.AIOESPNow()\ntry:\n    e.active(True)\nexcept OSError as err:\n    print(\"Failed to initialize AIOESPNow:\", err)\n    raise<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Defining the Pushbuttons<\/h4>\n\n\n\n<p>Then, define the pins for the pushbuttons. If you&#8217;re using different GPIOs for the pushbuttons, change accordingly.<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code># Define pins for pushbuttons\nbutton1_pin = Pin(21, Pin.IN, Pin.PULL_UP)  # Button for Board 1\nbutton2_pin = Pin(22, Pin.IN, Pin.PULL_UP)  # Button for Board 2\nbutton3_pin = Pin(23, Pin.IN, Pin.PULL_UP)  # Button for Board 3<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Receiver Boards&#8217; MAC Addresses<\/h4>\n\n\n\n<p>Add the MAC address of the receiver boards in the following lines. The MAC address should be in bytes format. For example:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span class=\"rnthl rntliteral\">30:AE:A4:F6:7D:4C<\/span>&nbsp;turns into&nbsp;<span class=\"rnthl rntliteral\">b\u2019\\x30\\xae\\xa4\\xf6\\x7d\\x4c\u2019<\/span><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code language-python\"><code># Define MAC addresses for receiving boards\nboard1_mac = b'\\x30\\xae\\xa4\\x07\\x0d\\x64'  # MAC address for Board 1\nboard2_mac = b'\\x0c\\xb8\\x15\\x81\\x2b\\x64'  # MAC address for Board 2\nboard3_mac = b'\\x30\\xae\\xa4\\xf6\\x7d\\x4c'  # MAC address for Board 3<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Boards Dictionary<\/h4>\n\n\n\n<p>We create a dictionary to associate each board number with its pushbutton and MAC address.<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code># Build dictionary with pin and MAC variables\nboards = {\n    1: {\"pin\": button1_pin, \"mac\": board1_mac},\n    2: {\"pin\": button2_pin, \"mac\": board2_mac},\n    3: {\"pin\": button3_pin, \"mac\": board3_mac}\n}<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Add Peers<\/h4>\n\n\n\n<p>Then, we add the receiver boards as peers.<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code># Add peers\nfor board_num, info in boards.items():\n    try:\n        e.add_peer(info&#091;\"mac\"])\n        print(f\"Added Board {board_num} peer: {info&#091;'mac']}\")\n    except OSError as err:\n        print(f\"Failed to add Board {board_num} peer: {err}\")\n        raise<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Monitor Buttons and Send Messages<\/h4>\n\n\n\n<p>The <span class=\"rnthl rntliteral\">monitor_buttons<\/span> function will check the state of each pushbutton and send a message to the corresponding board.<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code>async def monitor_buttons(e):<\/code><\/pre>\n\n\n\n<p>First, we create another dictionary to hold the state of the LED for each board.<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code>led_states = {1: False, 2: False, 3: False}<\/code><\/pre>\n\n\n\n<p>Then, we check whether a pushbutton was pressed<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code>for board_num, info in boards.items():\n    button = info&#091;\"pin\"]\n    if button.value() == 0:  # Button pressed (active low)\n        led_states&#091;board_num] = not led_states&#091;board_num]  # Toggle LED\n        command = \"LED_ON\" if led_states&#091;board_num] else \"LED_OFF\"\n        if await e.asend(info&#091;\"mac\"], command, sync=True):<\/code><\/pre>\n\n\n\n<p>Since we&#8217;re using the buttons in an active-low state, when the value of the pushbutton is 0, it means it was pressed.<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code>if button.value() == 0:  # Button pressed (active low)<\/code><\/pre>\n\n\n\n<p>When that happens, we toggle the LED state for the board whose button was pressed (in the <span class=\"rnthl rntliteral\">led_states<\/span> dictionary) and prepare the command to send via ESP-NOW.<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code>if button.value() == 0:  # Button pressed (active low)\n    led_states&#091;board_num] = not led_states&#091;board_num]  # Toggle LED\n    command = \"LED_ON\" if led_states&#091;board_num] else \"LED_OFF\"<\/code><\/pre>\n\n\n\n<p>Finally, we call the <span class=\"rnthl rntliteral\">asend()<\/span> method on the espnow <span class=\"rnthl rntliteral\">e<\/span> object to send the message to the corresponding board by referring to its MAC address.<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code>if await e.asend(info&#091;\"mac\"], command, sync=True):\n      print(f\"Board {board_num}: {command}\")\nelse:\n     print(f\"Board {board_num}: Failed to send\")\nawait asyncio.sleep(0.3)  # Debounce delay<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Create and Run the Asynchronous Task<\/h4>\n\n\n\n<p>Finally, we create the asynchronous main function and run the asynchronous task.<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code># Main async function\nasync def main(e):\n    await monitor_buttons(e)\n\n# Run the async program\ntry:\n    asyncio.run(main(e))\nexcept KeyboardInterrupt:\n    print(\"Stopping...\")\n    e.active(False)\n    sta.active(False)<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Uploading the Code to the Sender Board<\/h3>\n\n\n\n<p>After modifying the code with the MAC address of each receiver board, you can upload it to your board.<\/p>\n\n\n\n<p>In Thonny IDE, with a connection established with your board, go to <strong>File<\/strong> &gt; <strong>Save as <\/strong>&gt; <strong>MicroPython device<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"220\" height=\"202\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/01\/save-micropython-device-thonny-ide.png?resize=220%2C202&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Thonny IDE Save to MicroPython Device\" class=\"wp-image-109022\"\/><\/figure><\/div>\n\n\n<p>Save the code with the name <span class=\"rnthl rntliteral\">main.py<\/span>, otherwise it will not work. When you name a file <span class=\"rnthl rntliteral\">main.py<\/span>, it will automatically run when the ESP32 restarts or resets.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"545\" height=\"327\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/07\/save-micropython-device-main-py.png?resize=545%2C327&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Save main.py to micropython device\" class=\"wp-image-173223\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/07\/save-micropython-device-main-py.png?w=545&amp;quality=100&amp;strip=all&amp;ssl=1 545w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/07\/save-micropython-device-main-py.png?resize=300%2C180&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 545px) 100vw, 545px\" \/><\/figure><\/div>\n\n\n<p>After uploading the code to your board, reset the board by pressing the RST button or by unplugging and plugging power. It will start running the code.<\/p>\n\n\n\n<p>At the moment, the code will not work because we haven&#8217;t prepared the receiver boards yet.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Preparing the Receiver Boards<\/h2>\n\n\n\n<p>Follow this procedure for each of your ESP32 receiver boards. In this example, we&#8217;re using three ESP32 receiver boards, but you can use only two (or even just one), or more than three.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"422\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/07\/Three-ESP32-ESP-NOW-Receiver-Boards.jpg?resize=750%2C422&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Three ESP32 boards with ESP-NOW code to receive data\" class=\"wp-image-173277\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/07\/Three-ESP32-ESP-NOW-Receiver-Boards.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/07\/Three-ESP32-ESP-NOW-Receiver-Boards.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\">Wiring the Circuit<\/h3>\n\n\n\n<p>Wire one LED to each of your receiver boards. We&#8217;re connecting the LED to GPIO2, but you can connect to any other GPIO.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"724\" height=\"797\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/07\/ESP32-LED-GPIO2_bb.png?resize=724%2C797&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP32 with an LED connected to GPIO 2\" class=\"wp-image-173269\" style=\"width:622px;height:auto\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/07\/ESP32-LED-GPIO2_bb.png?w=724&amp;quality=100&amp;strip=all&amp;ssl=1 724w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/07\/ESP32-LED-GPIO2_bb.png?resize=273%2C300&amp;quality=100&amp;strip=all&amp;ssl=1 273w\" sizes=\"(max-width: 724px) 100vw, 724px\" \/><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\">ESP-NOW Receiver Code<\/h3>\n\n\n\n<p>Copy the following code to Thonny IDE and upload it to each of your receiver boards. This code will listen for ESP-NOW packets and turn the LED on or off accordingly.<\/p>\n\n\n\n<p><strong>Important:<\/strong> don&#8217;t forget to modify the code with the MAC address of the sender board.<\/p>\n\n\n<pre style=\"max-height: 40em; margin-bottom: 20px;\"><code class=\"language-python\"># Rui Santos &amp; Sara Santos - Random Nerd Tutorials\n# Complete project details at https:\/\/RandomNerdTutorials.com\/micropython-esp-now-esp32-one-to-many\/\n\nimport network\nimport aioespnow\nimport asyncio\nfrom machine import Pin\n\n# Initialize Wi-Fi in station mode\nsta = network.WLAN(network.STA_IF)\nsta.active(True)\nsta.config(channel=1)  # Match sender's channel\nsta.disconnect()\n\n# Initialize AIOESPNow\ne = aioespnow.AIOESPNow()\ntry:\n    e.active(True)\nexcept OSError as err:\n    print(&quot;Failed to initialize AIOESPNow:&quot;, err)\n    raise\n\n# Sender's MAC address\nsender_mac = b'\\xff\\xff\\xff\\xff\\xff\\xff'  # You need to replace with actual sender MAC address\n\n# Add sender as peer for more reliability\ntry:\n    e.add_peer(sender_mac)\n    print(f&quot;Added sender peer: {sender_mac}&quot;)\nexcept OSError as err:\n    print(f&quot;Failed to add sender peer: {err}&quot;)\n    raise\n\n# Initialize LED\nled = Pin(2, Pin.OUT)\nled.value(0)\n\n# Async function to receive messages and control LED\nasync def receive_messages(e):\n    while True:\n        try:\n            async for mac, msg in e:\n                message = msg.decode()\n                print(f&quot;Received from {mac.hex()}: {message}&quot;)\n                if message == &quot;LED_ON&quot;:\n                    led.value(1)  # Turn LED on\n                    print(&quot;LED turned ON&quot;)\n                elif message == &quot;LED_OFF&quot;:\n                    led.value(0)  # Turn LED off\n                    print(&quot;LED turned OFF&quot;)\n        except OSError as err:\n            print(&quot;Error:&quot;, err)\n            await asyncio.sleep(5)\n\n# Main async function\nasync def main(e):\n    await receive_messages(e)\n\n# Run the async program\ntry:\n    asyncio.run(main(e))\nexcept KeyboardInterrupt:\n    print(&quot;Stopping receiver...&quot;)\n    led.value(0)  # Turn off LED on exit\n    e.active(False)\n    sta.active(False)\n<\/code><\/pre>\n\t<p style=\"text-align:center\"><a class=\"rntwhite\" href=\"https:\/\/github.com\/RuiSantosdotme\/Random-Nerd-Tutorials\/raw\/master\/Projects\/ESP-MicroPython\/esp32_espnow_led_receiver.py\" target=\"_blank\">View raw code<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How Does the Code Work?<\/h3>\n\n\n\n<p>Continue reading to learn how the code works, or skip to the demonstration section.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Importing Libraries<\/h4>\n\n\n\n<p>Start by importing the required libraries.<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code>import network\nimport aioespnow\nimport asyncio\nfrom machine import Pin<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Initialize the Wi-Fi Interface and ESP-NOW<\/h4>\n\n\n\n<p>To use ESP-NOW, you first need to initialize the Wi-Fi interface.<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code># Initialize Wi-Fi in station mode\nsta = network.WLAN(network.STA_IF)\nsta.active(True)\nsta.config(channel=1)  # Match sender's channel\nsta.disconnect()<\/code><\/pre>\n\n\n\n<p>Then, you can initialize ESP-NOW communication protocol.<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code># Initialize AIOESPNow\ne = aioespnow.AIOESPNow()\ntry:\n    e.active(True)\nexcept OSError as err:\n    print(\"Failed to initialize AIOESPNow:\", err)\n    raise<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Add the Sender as a Peer<\/h4>\n\n\n\n<p>Add the sender board as a peer. Don&#8217;t forget to replace with your actual sender MAC address.<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code># Sender's MAC address\nsender_mac = b'\\x24\\x0A\\xC4\\x31\\x38\\x5C'  # Replace with actual sender MAC\n\n# Add sender as peer for more reliability\ntry:\n    e.add_peer(sender_mac)\n    print(f\"Added sender peer: {sender_mac}\")\nexcept OSError as err:\n    print(f\"Failed to add sender peer: {err}\")\n    raise<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Initialize the LED<\/h4>\n\n\n\n<p>Initialize the LED as an output on GPIO 2 and set its initial state to LOW.<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code># Initialize LED\nled = Pin(2, Pin.OUT)\nled.value(0)<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Receive ESP-NOW Messages and Control the LED<\/h4>\n\n\n\n<p>The <span class=\"rnthl rntliteral\">receive_messages()<\/span> asynchronous function will be listening for ESP-NOW messages.<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code>async def receive_messages(e):\n    while True:\n        try:\n            async for mac, msg in e:\n                message = msg.decode()\n                print(f\"Received from {mac.hex()}: {message}\")<\/code><\/pre>\n\n\n\n<p>Then, it will turn the LED on or off according to the received message.<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code>if message == \"LED_ON\":\n    led.value(1)  # Turn LED on\n    print(\"LED turned ON\")\nelif message == \"LED_OFF\":\n    led.value(0)  # Turn LED off\n    print(\"LED turned OFF\")<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Create and Run the Asynchronous Task<\/h4>\n\n\n\n<p>Finally, we create the asynchronous main function and run the asynchronous task.<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code># Main async function\nasync def main(e):\n    await receive_messages(e)\n\n# Run the async program\ntry:\n    asyncio.run(main(e))\nexcept KeyboardInterrupt:\n    print(\"Stopping receiver...\")\n    led.value(0)  # Turn off LED on exit\n    e.active(False)\n    sta.active(False)<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Uploading the Code to the Receiver Boards<\/h3>\n\n\n\n<p>After modifying the code with the MAC address of the sender board, you can upload the code provided to each of your receiver boards.<\/p>\n\n\n\n<p>In Thonny IDE, with a connection established with your board, go to <strong>File<\/strong> &gt; <strong>Save as <\/strong>&gt; <strong>MicroPython device<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"220\" height=\"202\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/01\/save-micropython-device-thonny-ide.png?resize=220%2C202&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Thonny IDE Save to MicroPython Device\" class=\"wp-image-109022\"\/><\/figure><\/div>\n\n\n<p>Save the code with the name <span class=\"rnthl rntliteral\">main.py<\/span>, otherwise it will not work. When you name a file <span class=\"rnthl rntliteral\">main.py<\/span>, it will automatically run when the ESP32 restarts or resets.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"545\" height=\"327\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/07\/save-micropython-device-main-py.png?resize=545%2C327&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Save main.py to micropython device\" class=\"wp-image-173223\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/07\/save-micropython-device-main-py.png?w=545&amp;quality=100&amp;strip=all&amp;ssl=1 545w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/07\/save-micropython-device-main-py.png?resize=300%2C180&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 545px) 100vw, 545px\" \/><\/figure><\/div>\n\n\n<p>After uploading the code to your board, reset the board by pressing the RST button or by unplugging and plugging in power. It will start running the code.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Demonstration<\/h2>\n\n\n\n<p>Press the pushbuttons on the sender board. Each button will toggle the LED state for a specific board. The ESP32 sender works like a remote control to send individual commands to each board.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"422\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/07\/One-ESP32-Controls-Multiple-Boards.jpg?resize=750%2C422&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"One ESP32 board controls three ESP32 boards via ESP-NOW by pressing a pushbutton for each board\" class=\"wp-image-173413\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/07\/One-ESP32-Controls-Multiple-Boards.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/07\/One-ESP32-Controls-Multiple-Boards.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>You can take a look at the following video to see this project working.<\/p>\n\n\n<div style=\"text-align:center\"><iframe src=\"https:\/\/player.vimeo.com\/video\/1157225599?color=ff9933&title=1&byline=0&portrait=0\" width=\"720\" height=\"405\" frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen><\/iframe><\/div><\/br>\n\n\n\n<h2 class=\"wp-block-heading\">Wrapping Up<\/h2>\n\n\n\n<p>In this tutorial, you learned how to send ESP-NOW messages from one ESP32 sender to multiple boards. This is just one of the many examples of how you can use ESP-NOW in your IoT and automation projects.<\/p>\n\n\n\n<p>We hope you&#8217;ve found this guide and project useful. We have more ESP-NOW guides that you may like:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/randomnerdtutorials.com\/micropython-esp-now-esp32\/\">MicroPython: ESP-NOW with ESP32 (Getting Started)<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/micropython-esp32-esp-now-two-way\/\">MicroPython: ESP32 ESP-NOW Two-Way Communication<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/micropython-esp-now-esp32-many-to-one\/\">MicroPython: ESP-NOW with ESP32\u2014Receive Data from Multiple Boards (many-to-one)<\/a><\/li>\n<\/ul>\n\n\n\n<p>If you want to learn more about programming the ESP32 using MicroPython firmware, check out our resources:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/randomnerdtutorials.com\/micropython-programming-with-esp32-and-esp8266\/\" title=\"\">MicroPython Programming with ESP32 and ESP8266 (<em>eBook<\/em>)<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/projects-esp32-esp8266-micropython\/\" title=\"\">All our MicroPython Projects and Guides<\/a><\/li>\n<\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this guide, you\u2019ll learn how to use ESP-NOW to control multiple ESP32 boards from a single ESP32 main controller (one-to-many setup). Think of it like a remote control that &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"MicroPython: ESP-NOW with ESP32 &#8211; Control Multiple Boards (One to Many)\" class=\"read-more button\" href=\"https:\/\/randomnerdtutorials.com\/micropython-esp-now-esp32-one-to-many\/#more-173214\" aria-label=\"Read more about MicroPython: ESP-NOW with ESP32 &#8211; Control Multiple Boards (One to Many)\">CONTINUE READING \u00bb<\/a><\/p>\n","protected":false},"author":5,"featured_media":173279,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[310,309,264],"tags":[],"class_list":["post-173214","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-micropython","category-0-esp32-micropython","category-project"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/07\/ESP-NOW-MicroPython-One-to-Many.jpg?fit=1920%2C1080&quality=100&strip=all&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/173214","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/comments?post=173214"}],"version-history":[{"count":10,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/173214\/revisions"}],"predecessor-version":[{"id":187695,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/173214\/revisions\/187695"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media\/173279"}],"wp:attachment":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media?parent=173214"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/categories?post=173214"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/tags?post=173214"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}