{"id":97239,"date":"2020-06-11T18:06:54","date_gmt":"2020-06-11T18:06:54","guid":{"rendered":"https:\/\/randomnerdtutorials.com\/?p=97239"},"modified":"2021-12-27T14:42:47","modified_gmt":"2021-12-27T14:42:47","slug":"esp-now-one-to-many-esp8266-nodemcu","status":"publish","type":"post","link":"https:\/\/randomnerdtutorials.com\/esp-now-one-to-many-esp8266-nodemcu\/","title":{"rendered":"ESP-NOW with ESP8266: Send Data to Multiple Boards (one-to-many)"},"content":{"rendered":"\n<p>In this tutorial you&#8217;ll learn how to use ESP-NOW communication protocol to send data from one ESP8266 NodeMCU board to multiple ESP8266 boards (one-to-many configuration). The boards will be programmed using Arduino IDE.<\/p>\n\n\n\n<div class=\"wp-block-image\"><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\/2020\/05\/ESP-NOW-ESP8266-NodeMCU-Send-Data-Multiple-Boards-Arduino-IDE.jpg?resize=1200%2C675&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP-NOW with ESP8266 NodeMCU: Send Data to Multiple Boards one-to-many\" class=\"wp-image-97241\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/05\/ESP-NOW-ESP8266-NodeMCU-Send-Data-Multiple-Boards-Arduino-IDE.jpg?w=1280&amp;quality=100&amp;strip=all&amp;ssl=1 1280w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/05\/ESP-NOW-ESP8266-NodeMCU-Send-Data-Multiple-Boards-Arduino-IDE.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/05\/ESP-NOW-ESP8266-NodeMCU-Send-Data-Multiple-Boards-Arduino-IDE.jpg?resize=1024%2C576&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/05\/ESP-NOW-ESP8266-NodeMCU-Send-Data-Multiple-Boards-Arduino-IDE.jpg?resize=768%2C432&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/figure><\/div>\n\n\n\n<p>We have other tutorials about ESP-NOW with the ESP8266:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/randomnerdtutorials.com\/esp-now-esp8266-nodemcu-arduino-ide\/\">Getting Started with ESP-NOW (ESP8266 NodeMCU with Arduino IDE)<\/a><\/li><li><a href=\"https:\/\/randomnerdtutorials.com\/esp-now-two-way-communication-esp8266-nodemcu\/\">ESP-NOW Two-Way Communication Between ESP8266 NodeMCU Boards<\/a><\/li><li><a href=\"https:\/\/randomnerdtutorials.com\/esp-now-many-to-one-esp8266-nodemcu\/\">ESP-NOW with ESP8266: Receive Data from Multiple Boards (many-to-one)<\/a><\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Project Overview<\/h2>\n\n\n\n<p>This tutorial shows how to send data from one ESP8266 to multiple ESP8266 boards using ESP-NOW (one-to-many configuration).<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"688\" height=\"433\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/06\/ESP8266-ESP-NOW-One-to-Many.png?resize=688%2C433&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP-NOW with ESP8266 NodeMCU: Send Data to Multiple Boards (one-to-many) Project Overview\" class=\"wp-image-97299\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/06\/ESP8266-ESP-NOW-One-to-Many.png?w=688&amp;quality=100&amp;strip=all&amp;ssl=1 688w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/06\/ESP8266-ESP-NOW-One-to-Many.png?resize=300%2C189&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 688px) 100vw, 688px\" \/><\/figure><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>One ESP8266 acts as a sender; <\/li><li>Multiple ESP8266 boards act as receivers. We tested this setup with two ESP8266 boards simultaneously. You should be able to add more boards to your setup; <\/li><li>The ESP8266 sender receives an acknowledge message if the messages are successfully delivered. You know which boards received the message and which boards didn&#8217;t; <\/li><li>As an example, we&#8217;ll exchange random values between the boards. You should modify this example to send commands or sensor readings.<\/li><\/ul>\n\n\n\n<p>This tutorial covers these two scenarios: <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>sending the same message to all boards;<\/li><li>sending a different message to each board.<\/li><\/ul>\n\n\n\n<p class=\"rntbox rntclblue\">You may also like reading: <a href=\"https:\/\/randomnerdtutorials.com\/esp-now-two-way-communication-esp8266-nodemcu\/\">ESP-NOW Two-Way Communication Between ESP8266 Boards<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p>We\u2019ll program the ESP8266 using Arduino IDE, so before proceeding with this tutorial you should have the ESP8266 add-on installed in your Arduino IDE. Follow the next guide:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/randomnerdtutorials.com\/how-to-install-esp8266-board-arduino-ide\/\">Installing the ESP8266 Board in Arduino IDE (Windows, Mac OS X, and Linux)<\/a><\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Parts Required<\/h2>\n\n\n\n<p>To follow this tutorial, you need multiple ESP8266 boards.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a rel=\"noreferrer noopener\" style=\"font-size: inherit; background-color: initial;\" href=\"https:\/\/makeradvisor.com\/tools\/esp8266-esp-12e-nodemcu-wi-fi-development-board\/\" target=\"_blank\">ESP8266<\/a><span style=\"font-size: inherit; background-color: initial;\">&nbsp;(read&nbsp;<\/span><a rel=\"noreferrer noopener\" style=\"font-size: inherit; background-color: initial;\" href=\"https:\/\/makeradvisor.com\/best-esp8266-wi-fi-development-board\/\" target=\"_blank\">Best ESP8266 development boards<\/a><span style=\"font-size: inherit; background-color: initial;\">) <\/span><\/li><\/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\">Getting the Boards MAC Address<\/h2>\n\n\n\n<p>To send messages via ESP-NOW, you need to know the receiver boards&#8217;&nbsp;<a href=\"https:\/\/randomnerdtutorials.com\/get-change-esp32-esp8266-mac-address-arduino\/\">MAC address<\/a>. Each board has a unique MAC address (learn how to&nbsp;<a href=\"https:\/\/randomnerdtutorials.com\/get-change-esp32-esp8266-mac-address-arduino\/\">Get and Change the ESP8266 MAC Address<\/a>).<\/p>\n\n\n\n<p>Upload the following code to each of your receiver boards to get its MAC address.<\/p>\n\n\n<pre style=\"max-height: 40em; margin-bottom: 20px;\"><code class=\"language-c\">\/*\n  Rui Santos &amp; Sara Santos - Random Nerd Tutorials\n  Complete project details at https:\/\/RandomNerdTutorials.com\/get-change-esp32-esp8266-mac-address-arduino\/\n  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files.  \n  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n*\/\n#ifdef ESP32\n  #include &lt;WiFi.h&gt;\n  #include &lt;esp_wifi.h&gt;\n#else\n  #include &lt;ESP8266WiFi.h&gt;\n#endif\n\nvoid setup(){\n  Serial.begin(115200);\n\n  Serial.print(&quot;ESP Board MAC Address: &quot;);\n  #ifdef ESP32\n    WiFi.mode(WIFI_STA);\n    WiFi.STA.begin();\n    uint8_t baseMac[6];\n    esp_err_t ret = esp_wifi_get_mac(WIFI_IF_STA, baseMac);\n    if (ret == ESP_OK) {\n      Serial.printf(&quot;%02x:%02x:%02x:%02x:%02x:%02x\\n&quot;,\n                    baseMac[0], baseMac[1], baseMac[2],\n                    baseMac[3], baseMac[4], baseMac[5]);\n    } else {\n      Serial.println(&quot;Failed to read MAC address&quot;);\n    }\n  #else\n    Serial.println(WiFi.macAddress());\n  #endif\n}\n \nvoid loop(){\n\n}\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\/ESP_Get_MAC_Address.ino\" target=\"_blank\">View raw code<\/a><\/p>\n\n\n\n<p>After uploading the code, press the RST\/EN button, and the MAC address should be displayed on the Serial Monitor.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"652\" height=\"421\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/ESP32_MAC_Address_Serial_monitor.jpg?resize=652%2C421&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP32 ESP8266 NodeMCU board MAC Address with Arduino IDE Serial Monitor\" class=\"wp-image-93078\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/ESP32_MAC_Address_Serial_monitor.jpg?w=652&amp;quality=100&amp;strip=all&amp;ssl=1 652w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/ESP32_MAC_Address_Serial_monitor.jpg?resize=300%2C194&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 652px) 100vw, 652px\" \/><\/figure><\/div>\n\n\n\n<p>You can write down the boards&#8217; MAC address on a label to clearly identify each board.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">ESP8266 NodeMCU Sender Code (ESP-NOW) <\/h2>\n\n\n\n<p>The following code sends data to multiple (two) ESP boards via ESP-NOW. You should modify the code with your receiver boards&#8217; MAC address. You should also add or delete lines of code depending on the number of receiver boards.<\/p>\n\n\n<pre style=\"max-height: 40em; margin-bottom: 20px;\"><code class=\"language-c\">\/*\n  Rui Santos\n  Complete project details at https:\/\/RandomNerdTutorials.com\/esp-now-one-to-many-esp8266-nodemcu\/\n  \n  Permission is hereby granted, free of charge, to any person obtaining a copy\n  of this software and associated documentation files.\n  \n  The above copyright notice and this permission notice shall be included in all\n  copies or substantial portions of the Software.\n*\/\n\n#include &lt;ESP8266WiFi.h&gt;\n#include &lt;espnow.h&gt;\n\n\/\/ REPLACE WITH RECEIVER MAC Address\nuint8_t broadcastAddress1[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};\nuint8_t broadcastAddress2[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};\n\n\/\/ Structure example to send data\n\/\/ Must match the receiver structure\ntypedef struct test_struct {\n    int x;\n    int y;\n} test_struct;\n\n\/\/ Create a struct_message called test to store variables to be sent\ntest_struct test;\n\nunsigned long lastTime = 0;  \nunsigned long timerDelay = 2000;  \/\/ send readings timer\n\n\/\/ Callback when data is sent\nvoid OnDataSent(uint8_t *mac_addr, uint8_t sendStatus) {\n  char macStr[18];\n  Serial.print(&quot;Packet to:&quot;);\n  snprintf(macStr, sizeof(macStr), &quot;%02x:%02x:%02x:%02x:%02x:%02x&quot;,\n         mac_addr[0], mac_addr[1], mac_addr[2], mac_addr[3], mac_addr[4], mac_addr[5]);\n  Serial.print(macStr);\n  Serial.print(&quot; send status: &quot;);\n  if (sendStatus == 0){\n    Serial.println(&quot;Delivery success&quot;);\n  }\n  else{\n    Serial.println(&quot;Delivery fail&quot;);\n  }\n}\n \nvoid setup() {\n  \/\/ Init Serial Monitor\n  Serial.begin(115200);\n \n  \/\/ Set device as a Wi-Fi Station\n  WiFi.mode(WIFI_STA);\n  WiFi.disconnect();\n\n  \/\/ Init ESP-NOW\n  if (esp_now_init() != 0) {\n    Serial.println(&quot;Error initializing ESP-NOW&quot;);\n    return;\n  }\n\n  esp_now_set_self_role(ESP_NOW_ROLE_CONTROLLER);\n  \n  \/\/ Once ESPNow is successfully Init, we will register for Send CB to\n  \/\/ get the status of Trasnmitted packet\n  esp_now_register_send_cb(OnDataSent);\n  \n  \/\/ Register peer\n  esp_now_add_peer(broadcastAddress1, ESP_NOW_ROLE_SLAVE, 1, NULL, 0);\n  esp_now_add_peer(broadcastAddress2, ESP_NOW_ROLE_SLAVE, 1, NULL, 0);\n\n}\n \nvoid loop() {\n  if ((millis() - lastTime) &gt; timerDelay) {\n    \/\/ Set values to send\n    test.x = random(1, 50);\n    test.y = random(1, 50);\n\n    \/\/ Send message via ESP-NOW\n    esp_now_send(0, (uint8_t *) &amp;test, sizeof(test));\n\n    lastTime = millis();\n  }\n}\n<\/code><\/pre>\n\t<p style=\"text-align:center\"><a class=\"rntwhite\" href=\"https:\/\/github.com\/RuiSantosdotme\/Random-Nerd-Tutorials\/raw\/master\/Projects\/ESP8266\/ESP_NOW\/ESP_NOW_Sender_One_to_Many.ino\" target=\"_blank\">View raw code<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How the code works<\/h3>\n\n\n\n<p>First, include the <span class=\"rnthl rntliteral\">espnow.h<\/span> and <span class=\"rnthl rntliteral\">ESP8266WiFi.h<\/span> libraries.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>#include &lt;ESP8266WiFi.h&gt;\n#include &lt;espnow.h&gt;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Receivers&#8217; MAC Address<\/h4>\n\n\n\n<p>Insert the receivers&#8217; MAC address. In our example, we&#8217;re sending data to two boards.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>uint8_t broadcastAddress1&#091;] = {0x5C, 0xCF, 0x7F, 0x99, 0xA1, 0x70};\nuint8_t broadcastAddress2&#091;] = {0x5C, 0xCF, 0x7F, 0x99, 0x9A, 0xEA};<\/code><\/pre>\n\n\n\n<p>Then, create a structure that contains the data we want to send. We called this structure <span class=\"rnthl rntliteral\">test_struct<\/span> and it contains two integer variables. You can change this to send whatever variable types you want.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>typedef struct test_struct {\n  int x;\n  int y;\n} test_struct;<\/code><\/pre>\n\n\n\n<p>Create a new variable of type <span class=\"rnthl rntliteral\">test_struct<\/span> that is called <span class=\"rnthl rntliteral\">test<\/span> that will store the variables values.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>test_struct test;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">OnDataSent() callback function <\/h4>\n\n\n\n<p>Next, define the <span class=\"rnthl rntliteral\">OnDataSent()<\/span> function. This is a callback function that will be executed when a message is sent. In this case, this function prints if the message was successfully delivered or not and for which MAC address. So, you know which boards received the message or and which boards didn&#8217;t.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>void OnDataSent(uint8_t *mac_addr, uint8_t sendStatus) {\n  char macStr&#091;18];\n  Serial.print(\"Packet to:\");\n  snprintf(macStr, sizeof(macStr), \"%02x:%02x:%02x:%02x:%02x:%02x\",\n          mac_addr&#091;0], mac_addr&#091;1], mac_addr&#091;2], mac_addr&#091;3], mac_addr&#091;4], mac_addr&#091;5]);\n  Serial.print(macStr);\n  Serial.print(\" send status: \");\n  if (sendStatus == 0){\n    Serial.println(\"Delivery success\");\n  }\n  else{\n    Serial.println(\"Delivery fail\");\n  }\n}<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">setup()<\/h4>\n\n\n\n<p>In the <span class=\"rnthl rntliteral\">setup()<\/span>, initialize the serial monitor for debugging purposes:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>Serial.begin(115200);<\/code><\/pre>\n\n\n\n<p>Set the device as a Wi-Fi station and disconnect Wi-Fi:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>WiFi.mode(WIFI_STA);\nWiFi.disconnect();<\/code><\/pre>\n\n\n\n<p>Initialize ESP-NOW:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>if (esp_now_init() != 0) {\n  Serial.println(\"Error initializing ESP-NOW\");\n  return;\n}<\/code><\/pre>\n\n\n\n<p>Set the ESP8266 role. This is a sender board, so set its role to <span class=\"rnthl rntliteral\">ESP_NOW_ROLE_CONTROLLER<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>esp_now_set_self_role(ESP_NOW_ROLE_CONTROLLER);<\/code><\/pre>\n\n\n\n<p>Register the callback function that will be called when a message is sent. In this case, register for the <span class=\"rnthl rntliteral\">OnDataSent()<\/span> function created previously.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>esp_now_register_send_cb(OnDataSent);<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Add peers<\/h4>\n\n\n\n<p>After that, we need to pair with other ESP-NOW devices to send data. That&#8217;s what we do in the next lines &#8211; register peers:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>esp_now_add_peer(broadcastAddress1, ESP_NOW_ROLE_SLAVE, 1, NULL, 0);\nesp_now_add_peer(broadcastAddress2, ESP_NOW_ROLE_SLAVE, 1, NULL, 0);<\/code><\/pre>\n\n\n\n<p>If you want to add more peers you just need to duplicate these previous lines and pass the peer MAC address:<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">loop()<\/h4>\n\n\n\n<p>In the <span class=\"rnthl rntliteral\">loop()<\/span>, we&#8217;ll send a message via ESP-NOW every 2 seconds (you can change this delay time on the <span class=\"rnthl rntliteral\">timerDelay<\/span> variable).<\/p>\n\n\n\n<p>Assign a value to each variable:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>test.x = random(0,20);\ntest.y = random(0,20);<\/code><\/pre>\n\n\n\n<p>Remember that <span class=\"rnthl rntliteral\">test<\/span> is a structure. Here assign the values that you want to send inside the structure. In this case, we&#8217;re just sending random values. In a practical application these should be replaced with commands or sensor readings, for example.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Send the same data to multiple boards<\/h4>\n\n\n\n<p>Finally, send the message as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>esp_now_send(0, (uint8_t *) &amp;test, sizeof(test));<\/code><\/pre>\n\n\n\n<p>The first argument of the <span class=\"rnthl rntliteral\">esp_now_send()<\/span> function is the receiver&#8217;s MAC address. If you pass <span class=\"rnthl rntliteral\">0<\/span> as an argument, it will send the same message to <strong>all registered peers<\/strong>. If you want to send a different message to each peer, follow the next section.<\/p>\n\n\n\n<p>Check if the message was successfully sent:<\/p>\n\n\n\n<p>The <span class=\"rnthl rntliteral\">loop()<\/span> is executed every 2000 milliseconds (2 seconds).<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>if ((millis() - lastTime) &gt; timerDelay) {\n  \/\/ Set values to send\n  test.x = random(1, 50);\n  test.y = random(1, 50);\n\n  \/\/ Send message via ESP-NOW\n  esp_now_send(0, (uint8_t *) &amp;test, sizeof(test));\n\n  lastTime = millis();\n}<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Send different data to each board<\/h4>\n\n\n\n<p>The code to send a different message to each board is very similar with the previous one. So, we&#8217;ll just take a look at the differences.<\/p>\n\n\n\n<p>If you want to send a different message to each board, you need to create a data structure for each of your boards, for example:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>test_struct test;\ntest_struct test2;<\/code><\/pre>\n\n\n\n<p>In this case we&#8217;re sending the same structure type (<span class=\"rnthl rntliteral\">test_struct<\/span>). You can send a different structure type as long as the receiver code is prepared to receive that type of structure.<\/p>\n\n\n\n<p>Then, assign different values to the variables of each structure. In this example, we&#8217;re just setting them to random numbers.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>test.x = random(0,20);\ntest.y = random(0,20);\ntest2.x = random(0,20);\ntest2.y = random(0,20);<\/code><\/pre>\n\n\n\n<p>Finally, you need to call the <span class=\"rnthl rntliteral\">esp_now_send()<\/span> function for each receiver.<\/p>\n\n\n\n<p>For example, send the <span class=\"rnthl rntliteral\">test<\/span> structure to the board whose MAC address is <span class=\"rnthl rntliteral\">broadcastAddress1<\/span>.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>esp_now_send(broadcastAddress1, (uint8_t *) &amp;test, sizeof(test));<\/code><\/pre>\n\n\n\n<p>Do the same for the other boards. For the second board send the <span class=\"rnthl rntliteral\">test2<\/span> structure:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>esp_now_send(broadcastAddress2, (uint8_t *) &amp;test2, sizeof(test2));<\/code><\/pre>\n\n\n\n<p>Here&#8217;s the complete code that sends a different message to each board.<\/p>\n\n\n<pre style=\"max-height: 40em; margin-bottom: 20px;\"><code class=\"language-c\">\/*\n  Rui Santos\n  Complete project details at https:\/\/RandomNerdTutorials.com\/esp-now-one-to-many-esp8266-nodemcu\/\n  \n  Permission is hereby granted, free of charge, to any person obtaining a copy\n  of this software and associated documentation files.\n  \n  The above copyright notice and this permission notice shall be included in all\n  copies or substantial portions of the Software.\n*\/\n\n#include &lt;ESP8266WiFi.h&gt;\n#include &lt;espnow.h&gt;\n\n\/\/ REPLACE WITH RECEIVER MAC Address\nuint8_t broadcastAddress1[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};\nuint8_t broadcastAddress2[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};\n\n\/\/ Structure example to send data\n\/\/ Must match the receiver structure\ntypedef struct test_struct {\n    int x;\n    int y;\n} test_struct;\n\n\/\/ Create a struct_message called test to store variables to be sent\ntest_struct test;\ntest_struct test2;\n\nunsigned long lastTime = 0;  \nunsigned long timerDelay = 2000;  \/\/ send readings timer\n\n\/\/ Callback when data is sent\nvoid OnDataSent(uint8_t *mac_addr, uint8_t sendStatus) {\n  char macStr[18];\n  Serial.print(&quot;Packet to:&quot;);\n  snprintf(macStr, sizeof(macStr), &quot;%02x:%02x:%02x:%02x:%02x:%02x&quot;,\n         mac_addr[0], mac_addr[1], mac_addr[2], mac_addr[3], mac_addr[4], mac_addr[5]);\n  Serial.print(macStr);\n  Serial.print(&quot; send status: &quot;);\n  if (sendStatus == 0){\n    Serial.println(&quot;Delivery success&quot;);\n  }\n  else{\n    Serial.println(&quot;Delivery fail&quot;);\n  }\n}\n \nvoid setup() {\n  \/\/ Init Serial Monitor\n  Serial.begin(115200);\n \n  \/\/ Set device as a Wi-Fi Station\n  WiFi.mode(WIFI_STA);\n  WiFi.disconnect();\n\n  \/\/ Init ESP-NOW\n  if (esp_now_init() != 0) {\n    Serial.println(&quot;Error initializing ESP-NOW&quot;);\n    return;\n  }\n\n  esp_now_set_self_role(ESP_NOW_ROLE_CONTROLLER);\n  \n  \/\/ Once ESPNow is successfully Init, we will register for Send CB to\n  \/\/ get the status of Trasnmitted packet\n  esp_now_register_send_cb(OnDataSent);\n  \n  \/\/ Register peer\n  esp_now_add_peer(broadcastAddress1, ESP_NOW_ROLE_SLAVE, 1, NULL, 0);\n  esp_now_add_peer(broadcastAddress2, ESP_NOW_ROLE_SLAVE, 1, NULL, 0);\n\n}\n \nvoid loop() {\n  if ((millis() - lastTime) &gt; timerDelay) {\n    \/\/ Set values to send\n    test.x = random(1, 50);\n    test.y = random(1, 50);\n    test2.x = random(1, 50);\n    test2.y = random(1, 50);\n\n    \/\/ Send message via ESP-NOW\n    esp_now_send(broadcastAddress1, (uint8_t *) &amp;test, sizeof(test));\n    esp_now_send(broadcastAddress2, (uint8_t *) &amp;test2, sizeof(test2));\n    lastTime = millis();\n  }\n}\n<\/code><\/pre>\n\t<p style=\"text-align:center\"><a class=\"rntwhite\" href=\"https:\/\/github.com\/RuiSantosdotme\/Random-Nerd-Tutorials\/raw\/master\/Projects\/ESP8266\/ESP_NOW\/ESP_NOW_Send_Different_Messages_One_to_Many.ino\" target=\"_blank\">View raw code<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">ESP8266 NodeMCU Receiver Code (ESP-NOW) <\/h2>\n\n\n\n<p>Upload the next code to the receiver boards (in our example, we&#8217;ve used two receiver boards).<\/p>\n\n\n<pre style=\"max-height: 40em; margin-bottom: 20px;\"><code class=\"language-c\">\/*\n  Rui Santos\n  Complete project details at https:\/\/RandomNerdTutorials.com\/esp-now-one-to-many-esp8266-nodemcu\/\n  \n  Permission is hereby granted, free of charge, to any person obtaining a copy\n  of this software and associated documentation files.\n  \n  The above copyright notice and this permission notice shall be included in all\n  copies or substantial portions of the Software.\n*\/\n\n#include &lt;ESP8266WiFi.h&gt;\n#include &lt;espnow.h&gt;\n\n\/\/ Structure example to receive data\n\/\/ Must match the sender structure\ntypedef struct test_struct {\n    int x;\n    int y;\n} test_struct;\n\n\/\/ Create a struct_message called myData\ntest_struct myData;\n\n\/\/ Callback function that will be executed when data is received\nvoid OnDataRecv(uint8_t * mac, uint8_t *incomingData, uint8_t len) {\n  memcpy(&amp;myData, incomingData, sizeof(myData));\n  Serial.print(&quot;Bytes received: &quot;);\n  Serial.println(len);\n  Serial.print(&quot;x: &quot;);\n  Serial.println(myData.x);\n  Serial.print(&quot;y: &quot;);\n  Serial.println(myData.y);\n  Serial.println();\n}\n \nvoid setup() {\n  \/\/ Initialize Serial Monitor\n  Serial.begin(115200);\n  \n  \/\/ Set device as a Wi-Fi Station\n  WiFi.mode(WIFI_STA);\n  WiFi.disconnect();\n\n  \/\/ Init ESP-NOW\n  if (esp_now_init() != 0) {\n    Serial.println(&quot;Error initializing ESP-NOW&quot;);\n    return;\n  }\n  \n  \/\/ Once ESPNow is successfully Init, we will register for recv CB to\n  \/\/ get recv packer info\n  esp_now_set_self_role(ESP_NOW_ROLE_SLAVE);\n  esp_now_register_recv_cb(OnDataRecv);\n}\n\nvoid loop() {\n  \n}\n<\/code><\/pre>\n\t<p style=\"text-align:center\"><a class=\"rntwhite\" href=\"https:\/\/github.com\/RuiSantosdotme\/Random-Nerd-Tutorials\/raw\/master\/Projects\/ESP8266\/ESP_NOW\/ESP_NOW_Receiver_One_to_Many.ino\" target=\"_blank\">View raw code<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How the code works<\/h3>\n\n\n\n<p>Similarly to the sender, start by including the libraries:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>#include &lt;ESP8266WiFi.h&gt;\n#include &lt;espnow.h&gt;<\/code><\/pre>\n\n\n\n<p>Create a structure to receive the data. This structure should be the same defined in the sender sketch.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>typedef struct test_struct {\n    int x;\n    int y;\n} test_struct;<\/code><\/pre>\n\n\n\n<p>Create a&nbsp;<span class=\"rnthl rntliteral\">test_struct<\/span>&nbsp;variable called&nbsp;<span class=\"rnthl rntliteral\">myData<\/span>.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>test_struct myData;<\/code><\/pre>\n\n\n\n<p>Create a callback function that is called when the ESP8266 receives the data via ESP-NOW. The function is called <span class=\"rnthl rntliteral\">onDataRecv()<\/span> and should accept several parameters as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>void OnDataRecv(uint8_t * mac, uint8_t *incomingData, uint8_t len) {<\/code><\/pre>\n\n\n\n<p>Copy the content of the <span class=\"rnthl rntliteral\">incomingData<\/span> data variable into the <span class=\"rnthl rntliteral\">myData<\/span> variable.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>memcpy(&amp;myData, incomingData, sizeof(myData));<\/code><\/pre>\n\n\n\n<p>Now, the&nbsp;<span class=\"rnthl rntliteral\">myData<\/span>&nbsp;structure contains several variables inside with the values sent by the sender ESP8266. To access variable&nbsp;<span class=\"rnthl rntliteral\">x<\/span>, for example, call&nbsp;<span class=\"rnthl rntliteral\">myData.x<\/span>.<\/p>\n\n\n\n<p>In this example, we print the received data, but in a practical application you can print the data on a <a href=\"https:\/\/randomnerdtutorials.com\/esp8266-0-96-inch-oled-display-with-arduino-ide\/\">OLED display<\/a>, for example.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>Serial.print(\"Bytes received: \");\nSerial.println(len);\nSerial.print(\"x: \");\nSerial.println(myData.x);\nSerial.print(\"y: \");\nSerial.println(myData.y);\nSerial.println();<\/code><\/pre>\n\n\n\n<p>In the <span class=\"rnthl rntliteral\">setup()<\/span>, intialize the Serial Monitor.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>Serial.begin(115200);<\/code><\/pre>\n\n\n\n<p>Set the device as a Wi-Fi Station and disconnect Wi-Fi.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>WiFi.mode(WIFI_STA);\nWiFi.disconnect();<\/code><\/pre>\n\n\n\n<p>Initialize ESP-NOW:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>if (esp_now_init() != 0) {\n  Serial.println(\"Error initializing ESP-NOW\");\n  return;\n}<\/code><\/pre>\n\n\n\n<p>Set the ESP8266 role. This is a receiver board, so set its role to <span class=\"rnthl rntliteral\">ESP_NOW_ROLE_SLAVE<\/span>.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>esp_now_set_self_role(ESP_NOW_ROLE_SLAVE);<\/code><\/pre>\n\n\n\n<p>Register for a callback function that will be called when data is received. In this case, we register for the <span class=\"rnthl rntliteral\">OnDataRecv()<\/span> function that was created previously.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>esp_now_register_recv_cb(OnDataRecv);<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Demonstration<\/h2>\n\n\n\n<p>Having all your boards powered on, open the Arduino IDE Serial Monitor for the COM port the sender is connected to.<\/p>\n\n\n\n<p>You should start receiving &#8220;<strong>Delivery Success<\/strong>&#8221; messages with the corresponding receiver&#8217;s MAC address in the Serial Monitor. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"953\" height=\"589\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/06\/ESP8266-ESP-NOW-Send-To-Multiple-Boards-Success-Serial-Monitor.jpg?resize=953%2C589&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP8266 NodeMCU ESP-NOW Send Data To Multiple Boards Delivery Status Serial Monitor\" class=\"wp-image-97301\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/06\/ESP8266-ESP-NOW-Send-To-Multiple-Boards-Success-Serial-Monitor.jpg?w=953&amp;quality=100&amp;strip=all&amp;ssl=1 953w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/06\/ESP8266-ESP-NOW-Send-To-Multiple-Boards-Success-Serial-Monitor.jpg?resize=300%2C185&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/06\/ESP8266-ESP-NOW-Send-To-Multiple-Boards-Success-Serial-Monitor.jpg?resize=768%2C475&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 953px) 100vw, 953px\" \/><\/figure><\/div>\n\n\n\n<p>If you remove power from one of the boards, you&#8217;ll receive a &#8220;<strong>Delivery Fail<\/strong>&#8221; message for that specific board. So, you can quickly identify which board didn&#8217;t receive the message.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"953\" height=\"589\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/06\/ESP8266-ESP-NOW-Send-To-Multiple-Boards-Fail-Serial-Monitor.jpg?resize=953%2C589&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP8266 NodeMCU ESP-NOW Send Data To Multiple Boards Delivery Status Failed Serial Monitor\" class=\"wp-image-97302\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/06\/ESP8266-ESP-NOW-Send-To-Multiple-Boards-Fail-Serial-Monitor.jpg?w=953&amp;quality=100&amp;strip=all&amp;ssl=1 953w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/06\/ESP8266-ESP-NOW-Send-To-Multiple-Boards-Fail-Serial-Monitor.jpg?resize=300%2C185&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/06\/ESP8266-ESP-NOW-Send-To-Multiple-Boards-Fail-Serial-Monitor.jpg?resize=768%2C475&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 953px) 100vw, 953px\" \/><\/figure><\/div>\n\n\n\n<p>If you want to check if the boards are actually receiving the messages, you can open the Serial Monitor for the COM port they are connected to, or you can use <a href=\"https:\/\/www.putty.org\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"PuTTY (opens in a new tab)\">PuTTY<\/a> to establish a serial communication with your boards.<\/p>\n\n\n\n<p>If you&#8217;re using PuTTY, select Serial communication, write the COM port number and the baud rate (115200) as shown below and click <strong>Open<\/strong>.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"452\" height=\"442\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/04\/Serial-Communication-ESP-Boards-PuTTY.png?resize=452%2C442&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Serial Communication ESP8266  NodeMCU Boards PuTTY\" class=\"wp-image-95741\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/04\/Serial-Communication-ESP-Boards-PuTTY.png?w=452&amp;quality=100&amp;strip=all&amp;ssl=1 452w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/04\/Serial-Communication-ESP-Boards-PuTTY.png?resize=300%2C293&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 452px) 100vw, 452px\" \/><\/figure><\/div>\n\n\n\n<p>Then, you should see the messages being received.<\/p>\n\n\n\n<p>Open a serial communication for each of your boards and check that they are receiving the messages.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1013\" height=\"268\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/06\/ESP-NOW-Send-Data-To-Multiple-Boards-Receivers.jpg?resize=1013%2C268&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP8266 NodeMCU ESP-NOW Send Data To Multiple Boards Delivery Success Demonstration\" class=\"wp-image-97303\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/06\/ESP-NOW-Send-Data-To-Multiple-Boards-Receivers.jpg?w=1013&amp;quality=100&amp;strip=all&amp;ssl=1 1013w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/06\/ESP-NOW-Send-Data-To-Multiple-Boards-Receivers.jpg?resize=300%2C79&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/06\/ESP-NOW-Send-Data-To-Multiple-Boards-Receivers.jpg?resize=768%2C203&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 1013px) 100vw, 1013px\" \/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Wrapping Up<\/h2>\n\n\n\n<p>In this tutorial you&#8217;ve learned how to send data to multiple ESP8266 boards from a single ESP8266 using ESP-NOW (one-to-many communication). You can do something similar with ESP32 boards (<a href=\"https:\/\/randomnerdtutorials.com\/esp-now-one-to-many-esp32-esp8266\/\">ESP32 ESP-NOW: One-to-many<\/a>).<\/p>\n\n\n\n<p>We hope you&#8217;ve found this tutorial useful. We have other ESP-NOW tutorials that you may like:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/randomnerdtutorials.com\/esp-now-esp8266-nodemcu-arduino-ide\/\">Getting Started with ESP-NOW (ESP8266 with Arduino IDE)<\/a><\/li><li><a href=\"https:\/\/randomnerdtutorials.com\/esp-now-two-way-communication-esp8266-nodemcu\/\">ESP-NOW Two-Way Communication Between ESP8266 NodeMCU Boards<\/a><\/li><\/ul>\n\n\n\n<p>Learn more about the ESP8266 with our resources:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/randomnerdtutorials.com\/learn-esp32-with-arduino-ide\/\"><\/a><a href=\"https:\/\/randomnerdtutorials.com\/home-automation-using-esp8266\/\">Home Automation with ESP8266<\/a><\/li><li><a href=\"https:\/\/randomnerdtutorials.com\/learn-esp32-with-arduino-ide\/\"><\/a><a href=\"https:\/\/randomnerdtutorials.com\/micropython-programming-with-esp32-and-esp8266\/\">MicroPython Programming with ESP32 and ESP8266<\/a><\/li><li><a href=\"https:\/\/randomnerdtutorials.com\/learn-esp32-with-arduino-ide\/\"><\/a><a href=\"https:\/\/randomnerdtutorials.com\/projects-esp8266\/\">More ESP8266 NodeMCU Projects<\/a><\/li><\/ul>\n\n\n\n<p>Thanks for reading.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial you&#8217;ll learn how to use ESP-NOW communication protocol to send data from one ESP8266 NodeMCU board to multiple ESP8266 boards (one-to-many configuration). The boards will be programmed &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"ESP-NOW with ESP8266: Send Data to Multiple Boards (one-to-many)\" class=\"read-more button\" href=\"https:\/\/randomnerdtutorials.com\/esp-now-one-to-many-esp8266-nodemcu\/#more-97239\" aria-label=\"Read more about ESP-NOW with ESP8266: Send Data to Multiple Boards (one-to-many)\">CONTINUE READING \u00bb<\/a><\/p>\n","protected":false},"author":5,"featured_media":97241,"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":[265,214,246,300,240,264],"tags":[],"class_list":["post-97239","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-esp8266-project","category-esp8266","category-esp8266-arduino-ide","category-0-esp8266","category-esp8266-projects","category-project"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/05\/ESP-NOW-ESP8266-NodeMCU-Send-Data-Multiple-Boards-Arduino-IDE.jpg?fit=1280%2C720&quality=100&strip=all&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/97239","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=97239"}],"version-history":[{"count":3,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/97239\/revisions"}],"predecessor-version":[{"id":108604,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/97239\/revisions\/108604"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media\/97241"}],"wp:attachment":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media?parent=97239"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/categories?post=97239"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/tags?post=97239"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}