{"id":93083,"date":"2020-01-30T14:47:28","date_gmt":"2020-01-30T14:47:28","guid":{"rendered":"https:\/\/randomnerdtutorials.com\/?p=93083"},"modified":"2025-06-13T14:28:47","modified_gmt":"2025-06-13T14:28:47","slug":"esp-now-two-way-communication-esp32","status":"publish","type":"post","link":"https:\/\/randomnerdtutorials.com\/esp-now-two-way-communication-esp32\/","title":{"rendered":"ESP-NOW Two-Way Communication Between ESP32 Boards"},"content":{"rendered":"\n<p>In this guide, we&#8217;ll show you how to establish a two-way communication between two ESP32 boards using ESP-NOW communication protocol. As an example, two ESP32 boards will exchange sensor readings (with a range in open field up to 220 meters ~ 722 feet).<\/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\/2020\/01\/ESP-NOW-Two-Way-Communication-Between-ESP32-Boards-Arduino-IDE.jpg?resize=1200%2C675&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP-NOW Two-Way Communication Between ESP32 Boards\" class=\"wp-image-93400\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/ESP-NOW-Two-Way-Communication-Between-ESP32-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\/01\/ESP-NOW-Two-Way-Communication-Between-ESP32-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\/01\/ESP-NOW-Two-Way-Communication-Between-ESP32-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\/01\/ESP-NOW-Two-Way-Communication-Between-ESP32-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<h2 class=\"wp-block-heading\">Watch the Video Introduction<\/h2>\n\n\n\n<p>For an introduction to ESP-NOW protocol, you can watch the following video:<\/p>\n\n\n<p style=\"text-align:center\"><iframe width=\"720\" height=\"405\" src=\"https:\/\/www.youtube.com\/embed\/qxwXwNS3Avw?rel=0\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n\n\n\n<p>If you want to learn more about <a href=\"https:\/\/randomnerdtutorials.com\/esp-now-esp32-arduino-ide\/\">ESP-NOW<\/a>, you can read this guide: <a href=\"https:\/\/randomnerdtutorials.com\/esp-now-esp32-arduino-ide\/\">Getting Started with ESP-NOW (ESP32 with Arduino IDE)<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Introducing ESP-NOW<\/h2>\n\n\n\n<p><a href=\"https:\/\/randomnerdtutorials.com\/esp-now-esp32-arduino-ide\/\"><strong>ESP-NOW<\/strong><\/a> is a connectionless communication protocol developed by Espressif that features short packet transmission. This protocol enables multiple devices to talk to each other without using Wi-Fi.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"1024\" height=\"256\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/esp-now-logo.png?resize=1024%2C256&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP-NOW - ESP32 Logo\" class=\"wp-image-93360\" style=\"width:416px;height:103px\" srcset=\"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=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=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: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>This is a fast communication protocol that can be used to exchange small messages (up to 250 bytes) between ESP32 boards. ESP-NOW is very versatile and you can have one-way or two-way communication in different arrangements. <\/p>\n\n\n\n<p>In this tutorial, we&#8217;ll show you how to establish a two-way communication between two 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=\"370\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/ESP_NOW_two_way_communication_two_boards.png?resize=750%2C370&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP-NOW ESP32 Two-Way Communication Protocol\" class=\"wp-image-93054\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/ESP_NOW_two_way_communication_two_boards.png?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/ESP_NOW_two_way_communication_two_boards.png?resize=300%2C148&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p class=\"rntbox rntclblue\"><strong>Note: <\/strong> read our <a href=\"https:\/\/randomnerdtutorials.com\/esp-now-esp32-arduino-ide\/\">ESP-NOW Getting Started Guide<\/a> for a complete introduction to ESP-NOW protocol with ESP32.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Project Overview<\/h2>\n\n\n\n<p>The following diagram shows a high-level overview of the project we&#8217;ll build.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/ESP-NOW-send-sensor-readings-project-overview.png?quality=100&#038;strip=all&#038;ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"900\" height=\"508\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/ESP-NOW-send-sensor-readings-project-overview.png?resize=900%2C508&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP-NOW Two-Way Communication - Send Sensor Readings Between Boards\" class=\"wp-image-93101\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/ESP-NOW-send-sensor-readings-project-overview.png?w=900&amp;quality=100&amp;strip=all&amp;ssl=1 900w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/ESP-NOW-send-sensor-readings-project-overview.png?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/ESP-NOW-send-sensor-readings-project-overview.png?resize=768%2C433&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 900px) 100vw, 900px\" \/><\/a><\/figure><\/div>\n\n\n<ul class=\"wp-block-list\">\n<li>In this project we&#8217;ll have two ESP32 boards. Each board is connected to an OLED display and a BME280 sensor;<\/li>\n\n\n\n<li>Each board gets temperature, humidity and pressure readings from their corresponding sensors;<\/li>\n\n\n\n<li>Each board sends its readings to the other board via ESP-NOW; <\/li>\n\n\n\n<li>When a board receives the readings, it displays them on the OLED display; <\/li>\n\n\n\n<li>After sending the readings, the board displays on the OLED if the message was successfully delivered;<\/li>\n\n\n\n<li>Each board needs to know the other board MAC address in order to send the message.<\/li>\n<\/ul>\n\n\n\n<p>In this example, we&#8217;re using a two-way communication between two boards, but you can add more boards to this setup, and having all boards communicating with each other.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p>Before proceeding with this project, make sure you check the following prerequisites.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">ESP32 add-on Arduino IDE<\/h3>\n\n\n\n<p>We\u2019ll program the ESP32 using Arduino IDE, so before proceeding with this tutorial you should have the ESP32 add-on installed in your Arduino IDE. Follow the next guide:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/randomnerdtutorials.com\/installing-esp32-arduino-ide-2-0\/\" title=\"\">Installing the ESP32 Board in Arduino IDE (Windows, Mac OS X, and Linux)<\/a><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Install libraries<\/h3>\n\n\n\n<p>Install the following libraries in your Arduino IDE. These libraries can be installed through the Arduino Library Manager. Go to&nbsp;<strong>Sketch&nbsp;<\/strong>&gt;&nbsp;<strong>Include Library<\/strong>&gt;&nbsp;<strong>Manage Libraries<\/strong>&nbsp;and search for the library name.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span style=\"font-size: inherit; background-color: initial;\">OLED libraries (<a href=\"https:\/\/randomnerdtutorials.com\/esp32-ssd1306-oled-display-arduino-ide\/\">ESP32 OLED Guide<\/a>):&nbsp;<\/span><a style=\"font-size: inherit; background-color: initial;\" href=\"https:\/\/github.com\/adafruit\/Adafruit_SSD1306\" target=\"_blank\" rel=\"noreferrer noopener\">Adafruit_SSD1306 library<\/a><span style=\"font-size: inherit; background-color: initial;\">&nbsp;and&nbsp;<\/span><a aria-label=\" (opens in a new tab)\" href=\"https:\/\/github.com\/adafruit\/Adafruit-GFX-Library\" target=\"_blank\" rel=\"noreferrer noopener\">Adafruit_GFX library<\/a><\/li>\n\n\n\n<li>BME280 libraries (<a href=\"https:\/\/randomnerdtutorials.com\/esp32-bme280-arduino-ide-pressure-temperature-humidity\/\">ESP32 BME280 Guide<\/a>):&nbsp;<a href=\"https:\/\/github.com\/adafruit\/Adafruit_BME280_Library\" target=\"_blank\" rel=\"noreferrer noopener\">Adafruit_BME280 library<\/a>&nbsp;and&nbsp;<a aria-label=\" (opens in a new tab)\" href=\"https:\/\/github.com\/adafruit\/Adafruit_Sensor\" target=\"_blank\" rel=\"noreferrer noopener\">Adafruit Unified Sensor library<\/a><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Parts Required<\/h3>\n\n\n\n<p>For this tutorial you need the following parts:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>2x <a aria-label=\"ESP32 development boards (opens in a new tab)\" href=\"https:\/\/makeradvisor.com\/tools\/esp32-dev-board-wi-fi-bluetooth\/\" target=\"_blank\" rel=\"noreferrer noopener\">ESP32 development boards<\/a> (read <a aria-label=\" (opens in a new tab)\" href=\"https:\/\/makeradvisor.com\/esp32-development-boards-review-comparison\/\" target=\"_blank\" rel=\"noreferrer noopener\">Best ESP32 boards<\/a>)<\/li>\n\n\n\n<li>2x <a aria-label=\"BME280 sensors (opens in a new tab)\" href=\"https:\/\/makeradvisor.com\/tools\/bme280-sensor-module\/\" target=\"_blank\" rel=\"noreferrer noopener\">BME280 sensors<\/a> (<a href=\"https:\/\/randomnerdtutorials.com\/esp32-bme280-arduino-ide-pressure-temperature-humidity\/\">BME280 Complete Guide<\/a>)<\/li>\n\n\n\n<li>2x <a aria-label=\"0.96inch OLED displays (opens in a new tab)\" href=\"https:\/\/makeradvisor.com\/tools\/oled-display-128x64-0-96-inch\/\" target=\"_blank\" rel=\"noreferrer noopener\">0.96 inch OLED displays<\/a> (<a href=\"https:\/\/randomnerdtutorials.com\/esp32-ssd1306-oled-display-arduino-ide\/\">OLED Complete Guide<\/a>)<\/li>\n\n\n\n<li><a aria-label=\"Breadboard\u2028 (opens in a new tab)\" href=\"https:\/\/makeradvisor.com\/tools\/mb-102-solderless-breadboard-830-points\/\" target=\"_blank\" rel=\"noreferrer noopener\">Breadboard<\/a><\/li>\n\n\n\n<li><a aria-label=\"Jumper wires (opens in a new tab)\" href=\"https:\/\/makeradvisor.com\/tools\/jumper-wires-kit-120-pieces\/\" target=\"_blank\" rel=\"noreferrer noopener\">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\">Getting the Boards MAC Address<\/h2>\n\n\n\n<p>To send messages between each board, we need to know <a href=\"https:\/\/randomnerdtutorials.com\/get-change-esp32-esp8266-mac-address-arduino\/\">their MAC address<\/a>. Each board has a unique MAC address (learn how to <a href=\"https:\/\/randomnerdtutorials.com\/get-change-esp32-esp8266-mac-address-arduino\/\">Get and Change the ESP32 MAC Address<\/a>).<\/p>\n\n\n\n<p>Upload the following code to each of your boards to get their 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#include &lt;WiFi.h&gt;\n#include &lt;esp_wifi.h&gt;\n\nvoid readMacAddress(){\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}\n\nvoid setup(){\n  Serial.begin(115200);\n\n  WiFi.mode(WIFI_STA);\n  WiFi.STA.begin();\n\n  Serial.print(&quot;[DEFAULT] ESP32 Board MAC Address: &quot;);\n  readMacAddress();\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\/ESP32\/ESP32_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<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" 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 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<p>Write down the MAC address of each board to clearly identify them.<\/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\/2020\/01\/Getting-the-ESP32-Board-MAC-Address-Arduino-IDE.jpg?resize=750%2C422&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP32 board MAC Address label\" class=\"wp-image-93402\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/Getting-the-ESP32-Board-MAC-Address-Arduino-IDE.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/Getting-the-ESP32-Board-MAC-Address-Arduino-IDE.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<h2 class=\"wp-block-heading\">Schematic Diagram<\/h2>\n\n\n\n<p>Wire an OLED display and a BME280 sensor to each ESP32 board. Follow the next schematic diagram.<\/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=\"744\" height=\"878\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/ESP32_OLED_BME280.png?resize=744%2C878&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP32 wiring schematic diagram to BME280 sensor and OLED display\" class=\"wp-image-93089\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/ESP32_OLED_BME280.png?w=744&amp;quality=100&amp;strip=all&amp;ssl=1 744w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/ESP32_OLED_BME280.png?resize=254%2C300&amp;quality=100&amp;strip=all&amp;ssl=1 254w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><\/figure><\/div>\n\n\n<p>You can use the following table as a reference when wiring the BME280 sensor.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>BME280<\/strong><\/td><td><strong>ESP32<\/strong><\/td><\/tr><tr><td>VIN<\/td><td>3.3V<\/td><\/tr><tr><td>GND<\/td><td>GND<\/td><\/tr><tr><td>SCL<\/td><td>GPIO 22<\/td><\/tr><tr><td>SDA<\/td><td>GPIO 21<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>You can also follow the next table to wire the OLED display to the ESP32.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>OLED Display<\/strong><\/td><td><strong>ESP32<\/strong><\/td><\/tr><tr><td>GND<\/td><td>GND<\/td><\/tr><tr><td>VCC<\/td><td>VIN<\/td><\/tr><tr><td>SCL<\/td><td>GPIO 22<\/td><\/tr><tr><td>SDA<\/td><td>GPIO 21<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"rntbox rntclgreen\">Learn more about <a href=\"https:\/\/randomnerdtutorials.com\/esp32-i2c-communication-arduino-ide\/\">interfacing multiple I2C peripherals with the ESP32<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">ESP32 Two-Way Communication ESP-NOW Code<\/h2>\n\n\n\n<p>Upload the following code to each of your boards. Before uploading the code, you need to enter the MAC address of the other board (the board you&#8217;re sending data to).<\/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\/esp-now-two-way-communication-esp32\/\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#include &lt;esp_now.h&gt;\n#include &lt;WiFi.h&gt;\n\n#include &lt;Wire.h&gt;\n#include &lt;Adafruit_Sensor.h&gt;\n#include &lt;Adafruit_BME280.h&gt;\n\n#include &lt;Adafruit_GFX.h&gt;\n#include &lt;Adafruit_SSD1306.h&gt;\n\n#define SCREEN_WIDTH 128  \/\/ OLED display width, in pixels\n#define SCREEN_HEIGHT 64  \/\/ OLED display height, in pixels\n\n\/\/ Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)\nAdafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &amp;Wire, -1);\n\nAdafruit_BME280 bme;\n\n\/\/ REPLACE WITH THE MAC Address of your receiver \nuint8_t broadcastAddress[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};\n\n\/\/ Define variables to store BME280 readings to be sent\nfloat temperature;\nfloat humidity;\nfloat pressure;\n\n\/\/ Define variables to store incoming readings\nfloat incomingTemp;\nfloat incomingHum;\nfloat incomingPres;\n\n\/\/ Variable to store if sending data was successful\nString success;\n\n\/\/Structure example to send data\n\/\/Must match the receiver structure\ntypedef struct struct_message {\n    float temp;\n    float hum;\n    float pres;\n} struct_message;\n\n\/\/ Create a struct_message called BME280Readings to hold sensor readings\nstruct_message BME280Readings;\n\n\/\/ Create a struct_message to hold incoming sensor readings\nstruct_message incomingReadings;\n\nesp_now_peer_info_t peerInfo;\n\n\/\/ Callback when data is sent\nvoid OnDataSent(const uint8_t *mac_addr, esp_now_send_status_t status) {\n  Serial.print(&quot;\\r\\nLast Packet Send Status:\\t&quot;);\n  Serial.println(status == ESP_NOW_SEND_SUCCESS ? &quot;Delivery Success&quot; : &quot;Delivery Fail&quot;);\n  if (status ==0){\n    success = &quot;Delivery Success :)&quot;;\n  }\n  else{\n    success = &quot;Delivery Fail :(&quot;;\n  }\n}\n\n\/\/ Callback when data is received\nvoid OnDataRecv(const uint8_t * mac, const uint8_t *incomingData, int len) {\n  memcpy(&amp;incomingReadings, incomingData, sizeof(incomingReadings));\n  Serial.print(&quot;Bytes received: &quot;);\n  Serial.println(len);\n  incomingTemp = incomingReadings.temp;\n  incomingHum = incomingReadings.hum;\n  incomingPres = incomingReadings.pres;\n}\n \nvoid setup() {\n  \/\/ Init Serial Monitor\n  Serial.begin(115200);\n\n  \/\/ Init BME280 sensor\n  bool status = bme.begin(0x76);  \n  if (!status) {\n    Serial.println(&quot;Could not find a valid BME280 sensor, check wiring!&quot;);\n    while (1);\n  }\n\n  \/\/ Init OLED display\n  if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { \n    Serial.println(F(&quot;SSD1306 allocation failed&quot;));\n    for(;;);\n  }\n \n  \/\/ Set device as a Wi-Fi Station\n  WiFi.mode(WIFI_STA);\n\n  \/\/ Init ESP-NOW\n  if (esp_now_init() != ESP_OK) {\n    Serial.println(&quot;Error initializing ESP-NOW&quot;);\n    return;\n  }\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  memcpy(peerInfo.peer_addr, broadcastAddress, 6);\n  peerInfo.channel = 0;  \n  peerInfo.encrypt = false;\n  \n  \/\/ Add peer        \n  if (esp_now_add_peer(&amp;peerInfo) != ESP_OK){\n    Serial.println(&quot;Failed to add peer&quot;);\n    return;\n  }\n  \/\/ Register for a callback function that will be called when data is received\n  esp_now_register_recv_cb(esp_now_recv_cb_t(OnDataRecv));\n}\n \nvoid loop() {\n  getReadings();\n \n  \/\/ Set values to send\n  BME280Readings.temp = temperature;\n  BME280Readings.hum = humidity;\n  BME280Readings.pres = pressure;\n\n  \/\/ Send message via ESP-NOW\n  esp_err_t result = esp_now_send(broadcastAddress, (uint8_t *) &amp;BME280Readings, sizeof(BME280Readings));\n   \n  if (result == ESP_OK) {\n    Serial.println(&quot;Sent with success&quot;);\n  }\n  else {\n    Serial.println(&quot;Error sending the data&quot;);\n  }\n  updateDisplay();\n  delay(10000);\n}\nvoid getReadings(){\n  temperature = bme.readTemperature();\n  humidity = bme.readHumidity();\n  pressure = (bme.readPressure() \/ 100.0F);\n}\n\nvoid updateDisplay(){\n  \/\/ Display Readings on OLED Display\n  display.clearDisplay();\n  display.setTextSize(1);\n  display.setTextColor(WHITE);\n  display.setCursor(0, 0);\n  display.println(&quot;INCOMING READINGS&quot;);\n  display.setCursor(0, 15);\n  display.print(&quot;Temperature: &quot;);\n  display.print(incomingTemp);\n  display.cp437(true);\n  display.write(248);\n  display.print(&quot;C&quot;);\n  display.setCursor(0, 25);\n  display.print(&quot;Humidity: &quot;);\n  display.print(incomingHum);\n  display.print(&quot;%&quot;);\n  display.setCursor(0, 35);\n  display.print(&quot;Pressure: &quot;);\n  display.print(incomingPres);\n  display.print(&quot;hPa&quot;);\n  display.setCursor(0, 56);\n  display.print(success);\n  display.display();\n  \n  \/\/ Display Readings in Serial Monitor\n  Serial.println(&quot;INCOMING READINGS&quot;);\n  Serial.print(&quot;Temperature: &quot;);\n  Serial.print(incomingReadings.temp);\n  Serial.println(&quot; \u00baC&quot;);\n  Serial.print(&quot;Humidity: &quot;);\n  Serial.print(incomingReadings.hum);\n  Serial.println(&quot; %&quot;);\n  Serial.print(&quot;Pressure: &quot;);\n  Serial.print(incomingReadings.pres);\n  Serial.println(&quot; hPa&quot;);\n  Serial.println();\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\/ESP32\/ESP_NOW\/ESP_NOW_Two_Way_Communication.ino\" target=\"_blank\">View raw code<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How the code works<\/h2>\n\n\n\n<p>We&#8217;ve covered in great detail how to interact with the OLED display and with the BME280 sensor in previous tutorials. Here, we&#8217;ll just take a look at the relevant parts when it comes to ESP-NOW.<\/p>\n\n\n\n<p>The code is well commented so that you understand what each line of code does.<\/p>\n\n\n\n<p>To use ESP-NOW, you need to include the next libraries.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>#include &lt;esp_now.h&gt;\n#include &lt;WiFi.h&gt;<\/code><\/pre>\n\n\n\n<p>In the next line, insert the MAC address of the receiver board:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>uint8_t broadcastAddress&#091;] = {0x30, 0xAE, 0xA4, 0x07, 0x0D, 0x64};<\/code><\/pre>\n\n\n\n<p>Create variables to store temperature, humidity and pressure readings from the BME280 sensor. These readings will be sent to the other board:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>\/\/ Define variables to store BME280 readings to be sent\nfloat temperature;\nfloat humidity;\nfloat pressure;<\/code><\/pre>\n\n\n\n<p>Create variables to store the sensor readings coming from the other board:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>\/\/ Define variables to store incoming readings\nfloat incomingTemp;\nfloat incomingHum;\nfloat incomingPres;<\/code><\/pre>\n\n\n\n<p>The following variable will store a success message if the readings are delivered successfully to the other board.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>\/\/ Variable to store if sending data was successful\nString success;<\/code><\/pre>\n\n\n\n<p>Create a structure that stores humidity, temperature and pressure readings.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>typedef struct struct_message {\n  float temp;\n  float hum;\n  float pres;\n} struct_message;<\/code><\/pre>\n\n\n\n<p>Then, you need to create two instances of that structure. One to receive the readings and another to store the readings to be sent.<\/p>\n\n\n\n<p>The <span class=\"rnthl rntliteral\">BME280Readings<\/span> will store the readings to be sent.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>\/\/ Create a struct_message called BME280Readings to hold sensor readings\nstruct_message BME280Readings;<\/code><\/pre>\n\n\n\n<p>The <span class=\"rnthl rntliteral\">incomingReadings<\/span> will store the data coming from the other board.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>\/\/ Create a struct_message to hold incoming sensor readings\nstruct_message incomingReadings;<\/code><\/pre>\n\n\n\n<p>Create a variable of type <span class=\"rnthl rntliteral\">esp_now_peer_info_t<\/span> to store information about the peer.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>esp_now_peer_info_t peerInfo;<\/code><\/pre>\n\n\n\n<p>Then, we need to create two callback functions. One will be called when data is sent, and another will be called when data is received.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">OnDataSent() callback function<\/h3>\n\n\n\n<p>The <span class=\"rnthl rntliteral\">OnDataSent()<\/span> function will be called when new data is sent. This function simply prints if the message was successfully delivered or not. If the message is delivered successfully, the status variable returns 0, so we can set our success message to <span class=\"rnthl rntliteral\">&#8220;Delivery Success&#8221;<\/span>:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>Serial.println(status == ESP_NOW_SEND_SUCCESS ? \"Delivery Success\" : \"Delivery Fail\");\nif (status ==0) {\n  success = \"Delivery Success :)\";\n}<\/code><\/pre>\n\n\n\n<p>If the success message returns 1, it means the delivery failed:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>else {\n  success = \"Delivery Fail :(\";\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">OnDataRecv() callback function<\/h3>\n\n\n\n<p>The <span class=\"rnthl rntliteral\">OnDataRecv()<\/span> function will be called when a new packet arrives.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>void OnDataRecv(const uint8_t * mac, const uint8_t *incomingData, int len) {<\/code><\/pre>\n\n\n\n<p>We save the new packet in the <span class=\"rnthl rntliteral\">incomingReadings<\/span> structure we&#8217;ve created previously:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>memcpy(&amp;incomingReadings, incomingData, sizeof(incomingReadings));<\/code><\/pre>\n\n\n\n<p>We print the message length on the serial monitor. You can only send 250 bytes in each packet.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>Serial.print(\"Bytes received: \");\nSerial.println(len);<\/code><\/pre>\n\n\n\n<p>Then, store the incoming readings in their corresponding variables. To access the temperature variable inside <span class=\"rnthl rntliteral\">incomingReadings<\/span> structure, you just need to do call <span class=\"rnthl rntliteral\">incomingReadings.temp<\/span> as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>incomingTemp = incomingReadings.temp;<\/code><\/pre>\n\n\n\n<p>The same process is done for the other variables:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>incomingHum = incomingReadings.hum;\nincomingPres = incomingReadings.pres;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">setup()<\/h3>\n\n\n\n<p>In the <span class=\"rnthl rntliteral\">setup()<\/span>, initialize ESP-NOW.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>if (esp_now_init() != ESP_OK) {\n  Serial.println(\"Error initializing ESP-NOW\");\n  return;\n}<\/code><\/pre>\n\n\n\n<p>Then, register for the <span class=\"rnthl rntliteral\">OnDataSent<\/span> callback function. <\/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<p>In order to send data to another board, you need to pair it as a peer. The following lines register and add a new peer.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>\/\/ Register peer\nmemcpy(peerInfo.peer_addr, broadcastAddress, 6);\npeerInfo.channel = 0;\npeerInfo.encrypt = false;\n\n\/\/ Add peer\nif (esp_now_add_peer(&amp;peerInfo) != ESP_OK){\n  Serial.println(\"Failed to add peer\");\n  return;\n}<\/code><\/pre>\n\n\n\n<p>Register for the <span class=\"rnthl rntliteral\">OnDataRecv<\/span> callback function.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code> esp_now_register_recv_cb(esp_now_recv_cb_t(OnDataRecv));<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">loop()<\/h3>\n\n\n\n<p>In the <span class=\"rnthl rntliteral\">loop()<\/span>, we call the <span class=\"rnthl rntliteral\">getReadings()<\/span> function that is responsible for getting new temperature readings from the sensor. That function is created after the <span class=\"rnthl rntliteral\">loop()<\/span>.<\/p>\n\n\n\n<p>After getting new temperature, humidity and pressure readings, we update our <span class=\"rnthl rntliteral\">BME280Reading<\/span> structure with those new values:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>BME280Readings.temp = temperature;\nBME280Readings.hum = humidity;\nBME280Readings.pres = pressure;<\/code><\/pre>\n\n\n\n<p>Then, we can send the <span class=\"rnthl rntliteral\">BME280Readings<\/span> structure via ESP-NOW:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>\/\/ Send message via ESP-NOW\nesp_err_t result = esp_now_send(broadcastAddress, (uint8_t *) &amp;BME280Readings, sizeof(BME280Readings));\n\nif (result == ESP_OK) {\n  Serial.println(\"Sent with success\");\n}\nelse {\n  Serial.println(\"Error sending the data\");\n}<\/code><\/pre>\n\n\n\n<p>Finally, call the <span class=\"rnthl rntliteral\">updateDisplay()<\/span> function that will update the OLED display with the readings coming from the other ESP32 board.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>updateDisplay();<\/code><\/pre>\n\n\n\n<p>The <span class=\"rnthl rntliteral\">loop()<\/span> is executed every 10 seconds.<\/p>\n\n\n\n<p>That&#8217;s pretty much how the code works. You should upload the code to both of your boards. You just need to modify the code with the MAC address of the board you&#8217;re sending data to. <\/p>\n\n\n\n<p class=\"rntbox rntclblue\"><strong>Recommended reading:<\/strong> <a href=\"https:\/\/randomnerdtutorials.com\/esp32-ssd1306-oled-display-arduino-ide\/\">Guide for OLED Display with ESP32<\/a> and <a href=\"https:\/\/randomnerdtutorials.com\/esp32-bme280-arduino-ide-pressure-temperature-humidity\/\">Guide for BME280 Sensor with ESP32<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Demonstration<\/h2>\n\n\n\n<p>After uploading the code to both boards, you should see the OLED displaying the sensor readings from the other board, as well as a success delivery message.<\/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=\"900\" height=\"507\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/ESP32-ESP-NOW-Protocol-Exchange-Data-Demonstration.jpg?resize=900%2C507&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP32 ESP-NOW Protocol Exchange Data Demonstration\" class=\"wp-image-93404\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/ESP32-ESP-NOW-Protocol-Exchange-Data-Demonstration.jpg?w=900&amp;quality=100&amp;strip=all&amp;ssl=1 900w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/ESP32-ESP-NOW-Protocol-Exchange-Data-Demonstration.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/ESP32-ESP-NOW-Protocol-Exchange-Data-Demonstration.jpg?resize=768%2C433&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 900px) 100vw, 900px\" \/><\/figure><\/div>\n\n\n<p>As you can see, it&#8217;s working as expected:<\/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=\"610\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/ESP32-board-ESP-NOW-Protocol-Exchange-Data-Demonstration.jpg?resize=750%2C610&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP32 ESP-NOW Protocol Exchange Data Demonstration\" class=\"wp-image-93410\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/ESP32-board-ESP-NOW-Protocol-Exchange-Data-Demonstration.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/ESP32-board-ESP-NOW-Protocol-Exchange-Data-Demonstration.jpg?resize=300%2C244&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>We tested the communication range between the two boards, and we are able to get a stable communication up to 220 meters (approximately 722 feet) in open field. In this experiment both ESP32 on-board antennas were pointing at each other.<\/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=\"389\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/ESP_NOW_ESP32_testing_range.png?resize=750%2C389&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP-NOW communication range test with ESP32 boards\" class=\"wp-image-93081\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/ESP_NOW_ESP32_testing_range.png?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/ESP_NOW_ESP32_testing_range.png?resize=300%2C156&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\">Wrapping Up<\/h2>\n\n\n\n<p>In this tutorial we&#8217;ve shown you how to establish a two-way communication with two ESP32 boards using ESP-NOW. This is a very versatile communication protocol that can be used to send packets with up to 250 bytes. ESP-NOW communication protocol can also be used with ESP8266 boards: <a href=\"https:\/\/randomnerdtutorials.com\/esp-now-esp8266-nodemcu-arduino-ide\/\">Getting Started with ESP-NOW (ESP8266 NodeMCU with Arduino IDE)<\/a>.<\/p>\n\n\n\n<p>As an example, we&#8217;ve shown you the interaction between two boards, but you can add many boards to your setup. You just need to know the MAC address of the board you&#8217;re sending data to.<\/p>\n\n\n\n<p>We&#8217;ll be publishing more tutorials about <a href=\"https:\/\/randomnerdtutorials.com\/esp-now-esp32-arduino-ide\/\"><strong>ESP-NOW<\/strong><\/a>, so stay tuned. Additionally, write a comment below saying which tutorial you would like to see with ESP-NOW.<\/p>\n\n\n\n<p>To learn more about the ESP32 board, take a look at our resources:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/randomnerdtutorials.com\/learn-esp32-with-arduino-ide\/\">Learn ESP32 with Arduino IDE (video course + eBook)<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/micropython-programming-with-esp32-and-esp8266\/\">MicroPython Programming with ESP32 and ESP8266<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/projects-esp32\/\">More ESP32 resources\u2026<\/a><\/li>\n<\/ul>\n\n\n\n<p>Thanks for reading.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this guide, we&#8217;ll show you how to establish a two-way communication between two ESP32 boards using ESP-NOW communication protocol. As an example, two ESP32 boards will exchange sensor readings &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"ESP-NOW Two-Way Communication Between ESP32 Boards\" class=\"read-more button\" href=\"https:\/\/randomnerdtutorials.com\/esp-now-two-way-communication-esp32\/#more-93083\" aria-label=\"Read more about ESP-NOW Two-Way Communication Between ESP32 Boards\">CONTINUE READING \u00bb<\/a><\/p>\n","protected":false},"author":1,"featured_media":93399,"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":[281,276,277,299,264],"tags":[],"class_list":["post-93083","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-esp32-project","category-esp32","category-esp32-arduino-ide","category-0-esp32","category-project"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/01\/ESP-NOW-ESP32-EXPLAINED-Easiest-Wireless-Communication-Between-ESP32-Boards.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\/93083","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/comments?post=93083"}],"version-history":[{"count":4,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/93083\/revisions"}],"predecessor-version":[{"id":171264,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/93083\/revisions\/171264"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media\/93399"}],"wp:attachment":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media?parent=93083"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/categories?post=93083"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/tags?post=93083"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}