{"id":2104,"date":"2024-01-24T09:21:39","date_gmt":"2024-01-24T09:21:39","guid":{"rendered":"https:\/\/www.niraltek.com\/blog\/?p=2104"},"modified":"2024-03-11T05:27:50","modified_gmt":"2024-03-11T05:27:50","slug":"exploring-esp-now-communication-with-esp32","status":"publish","type":"post","link":"https:\/\/www.niraltek.com\/blog\/exploring-esp-now-communication-with-esp32\/","title":{"rendered":"Exploring ESP-NOW Communication with ESP32: One-Way Communication"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"2104\" class=\"elementor elementor-2104\">\n\t\t\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-5da6dc0 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"5da6dc0\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-679c94e\" data-id=\"679c94e\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-b19c49c elementor-widget elementor-widget-text-editor\" data-id=\"b19c49c\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<style>\/*! elementor - v3.8.0 - 30-10-2022 *\/\n.elementor-widget-text-editor.elementor-drop-cap-view-stacked .elementor-drop-cap{background-color:#818a91;color:#fff}.elementor-widget-text-editor.elementor-drop-cap-view-framed .elementor-drop-cap{color:#818a91;border:3px solid;background-color:transparent}.elementor-widget-text-editor:not(.elementor-drop-cap-view-default) .elementor-drop-cap{margin-top:8px}.elementor-widget-text-editor:not(.elementor-drop-cap-view-default) .elementor-drop-cap-letter{width:1em;height:1em}.elementor-widget-text-editor .elementor-drop-cap{float:left;text-align:center;line-height:1;font-size:50px}.elementor-widget-text-editor .elementor-drop-cap-letter{display:inline-block}<\/style>\t\t\t\t<h4><span style=\"font-size: 18pt;\">The Internet of Things (IoT)<\/span><\/h4><div><ul><li>The promise of IoT lies in everyday objects becoming interconnected, revolutionizing how we interactwith our environment.<\/li><li>In the realm of IoT, wireless communication plays a crucial role by enabling devices to share datawithout cumbersome cables.<\/li><li>While Wi-Fi is a popular choice, it can be complex and power-hungry for simpler tasks.<\/li><\/ul><\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-699075e elementor-widget elementor-widget-text-editor\" data-id=\"699075e\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h4><span style=\"font-size: 18pt;\">Enter ESP-NOW<\/span><\/h4><ul><li>Espressif Systems has addressed this need with ESP-NOW, a fast and efficient protocol specifically designed for direct communication between ESP32 devices.<\/li><li>It&#8217;s perfect for low-power IoT applications where simplicity and speed are paramount. Let&#8217;s delve into the intricacies of ESP-NOW communication, focusing on the one-way communication scenario.<\/li><\/ul>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-50d01e8 elementor-widget elementor-widget-text-editor\" data-id=\"50d01e8\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h2><span style=\"font-weight: bolder;\">Understanding ESP-NOW<\/span><\/h2>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-e97dbda elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"e97dbda\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-432d9b3\" data-id=\"432d9b3\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-87064ea elementor-widget elementor-widget-text-editor\" data-id=\"87064ea\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h4>What is ESP-NOW?<\/h4><div><div>ESP-NOW is a communication protocol developed by Espressif Systems for their ESP32<\/div><div>microcontroller. It enables fast and efficient communication between ESP devices, bypassing the<\/div><div>need for a traditional Wi-Fi network.<\/div><\/div><p>\u00a0<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6f8a2e6 elementor-widget elementor-widget-image\" data-id=\"6f8a2e6\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<style>\/*! elementor - v3.8.0 - 30-10-2022 *\/\n.elementor-widget-image{text-align:center}.elementor-widget-image a{display:inline-block}.elementor-widget-image a img[src$=\".svg\"]{width:48px}.elementor-widget-image img{vertical-align:middle;display:inline-block}<\/style>\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"224\" height=\"224\" src=\"https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/esp-now.png\" class=\"attachment-medium size-medium\" alt=\"\" loading=\"lazy\" srcset=\"https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/esp-now.png 224w, https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/esp-now-150x150.png 150w\" sizes=\"(max-width: 224px) 100vw, 224px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-a80e221 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"a80e221\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-5d71942\" data-id=\"5d71942\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-0df00e7 elementor-widget elementor-widget-text-editor\" data-id=\"0df00e7\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h5>Functionality:<\/h5><div><ul><li>Enables multiple ESP32 devices to communicate with each other without using Wi-Fi.<\/li><li>Similar to low-power 2.4GHz wireless connectivity.<\/li><li>Requires pairing between devices before communication.<\/li><li>Connection is safe and peer-to-peer once pairing is done.<\/li><li>Persistent connection even if a device loses power or resets.<\/li><\/ul><div><h5>Features:<\/h5><div><ul><li>Supports encrypted and unencrypted unicast communication.<\/li><li>Allows mixed encrypted and unencrypted peer devices.<\/li><li>Up to 250-byte payload can be carried in each message.<\/li><li>Provides a sending callback function to inform the application layer of transmission success or failure.<\/li><\/ul><div><h5>Limitations:<\/h5><div><ul><li>Limited encrypted peers: 10 in Station mode, 6 in SoftAP or SoftAP + Station mode.<\/li><li>Multiple unencrypted peers supported, but their total number should be less than 20, including encrypted peers.<\/li><li>Payload is limited to 250 bytes.<\/li><\/ul><div><h5>Use Cases:<\/h5><div>\u00a0<\/div><\/div><\/div><ul><li>\u00a0Fast communication protocol for exchanging small messages (up to 250 bytes) between ESP32 boards.<\/li><li>Versatile with support for one-way or two-way communication in different setups.<\/li><\/ul><\/div><\/div><div>\u00a0<\/div><div>\u00a0<\/div><\/div><\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7e9303c elementor-widget elementor-widget-text-editor\" data-id=\"7e9303c\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h1>Types of ESP-NOW Communication<\/h1><h5>ESP-NOW supports various communication types:<\/h5><h4>One-Way Communication (Our Focus):<\/h4><div><div>Sender communicates with the receiver without expecting a response. Ideal for remote control,<\/div><div>sensor readings, or sending commands<\/div><\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-814917b elementor-widget elementor-widget-image\" data-id=\"814917b\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"640\" height=\"221\" src=\"https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/one-focus-768x265.png\" class=\"attachment-medium_large size-medium_large\" alt=\"\" loading=\"lazy\" srcset=\"https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/one-focus-768x265.png 768w, https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/one-focus-300x104.png 300w, https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/one-focus-1024x354.png 1024w, https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/one-focus-1536x531.png 1536w, https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/one-focus.png 2026w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-15ba95a elementor-widget elementor-widget-text-editor\" data-id=\"15ba95a\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h4>Two-Way Communication:<\/h4><div><div>Both devices can send and receive data, enabling interactive communication like chatting or data<\/div><div>exchange.<\/div><\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-744cb4a elementor-widget elementor-widget-image\" data-id=\"744cb4a\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"640\" height=\"221\" src=\"https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/two-ways-768x265.png\" class=\"attachment-medium_large size-medium_large\" alt=\"\" loading=\"lazy\" srcset=\"https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/two-ways-768x265.png 768w, https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/two-ways-300x104.png 300w, https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/two-ways-1024x354.png 1024w, https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/two-ways-1536x531.png 1536w, https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/two-ways.png 2026w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-b003b8f elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"b003b8f\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-03ca142\" data-id=\"03ca142\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-ebcc4a0 elementor-widget elementor-widget-text-editor\" data-id=\"ebcc4a0\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h4>Benefits of ESP-NOW for this Project<\/h4>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ddb25fc elementor-widget elementor-widget-text-editor\" data-id=\"ddb25fc\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h4><span style=\"font-size: 16px; letter-spacing: -0.05em;\">Speed and Efficiency:<\/span><\/h4><ul><li>Ideal for sending small data packets like button presses.<\/li><\/ul><h6>Low Power Consumption:<\/h6><ul><li>Saves battery life on both sender and receiver.<\/li><\/ul><h6>No Complex Wi-Fi Setup:<\/h6><ul><li>Quick and easy to implement, perfect for beginners.<\/li><\/ul>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-2150422 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"2150422\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7add330\" data-id=\"7add330\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-bc3fbee elementor-widget elementor-widget-text-editor\" data-id=\"bc3fbee\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<blockquote><p><span style=\"font-size: 18pt; font-style: normal;\">Connection Diagram<\/span><\/p><\/blockquote>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-4cb0189 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"4cb0189\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-top-column elementor-element elementor-element-d3dab84\" data-id=\"d3dab84\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-e4e924e elementor-widget elementor-widget-text-editor\" data-id=\"e4e924e\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h5>Sender Connection Diagram<\/h5>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9a26c4c elementor-widget elementor-widget-image\" data-id=\"9a26c4c\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"550\" height=\"550\" src=\"https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/green.png\" class=\"attachment-medium_large size-medium_large\" alt=\"\" loading=\"lazy\" srcset=\"https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/green.png 550w, https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/green-300x300.png 300w, https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/green-150x150.png 150w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-top-column elementor-element elementor-element-d3f9a3d\" data-id=\"d3f9a3d\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-1823f66 elementor-widget elementor-widget-text-editor\" data-id=\"1823f66\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h5>Receiver Connection Diagram<\/h5>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-141717c elementor-widget elementor-widget-image\" data-id=\"141717c\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"550\" height=\"550\" src=\"https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/red.png\" class=\"attachment-medium_large size-medium_large\" alt=\"\" loading=\"lazy\" srcset=\"https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/red.png 550w, https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/red-300x300.png 300w, https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/red-150x150.png 150w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-289764b elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"289764b\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-b136927\" data-id=\"b136927\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-c710c71 elementor-widget elementor-widget-text-editor\" data-id=\"c710c71\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h4>Retrieving Your Board&#8217;s MAC Address<\/h4><div><div>In order to establish communication via ESP-NOW, it is crucial to be aware of the MAC Address<\/div><div>assigned to the ESP32 receiver. The MAC Address serves as a unique identifier, allowing the sender<\/div><div>to specify the intended recipient for data transmission.<\/div><div>\u00a0<\/div><div>To obtain the MAC Address of your ESP32 board, upload the provided code below:<\/div><\/div><div>\u00a0<\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-97d6690 elementor-widget elementor-widget-text-editor\" data-id=\"97d6690\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div style=\"background-color: #f5f5f5; border: 1px solid #cccccc; border-radius: 4px; padding: 15px; margin-bottom: 15px;\">#include &#8220;WiFi.h&#8221;<br \/>void setup()<br \/>{<br \/>Serial.begin(115200);<br \/>WiFi.mode(WIFI_MODE_STA);<br \/>Serial.println(WiFi.macAddress());<br \/>}<br \/>void loop()<br \/>{}<\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f2fa9ba elementor-widget elementor-widget-image\" data-id=\"f2fa9ba\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"640\" height=\"303\" src=\"https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/Mac-Add-768x363.png\" class=\"attachment-medium_large size-medium_large\" alt=\"\" loading=\"lazy\" srcset=\"https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/Mac-Add-768x363.png 768w, https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/Mac-Add-300x142.png 300w, https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/Mac-Add-1024x484.png 1024w, https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/Mac-Add.png 1169w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-651190b elementor-widget elementor-widget-text-editor\" data-id=\"651190b\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<ul><li>The MAC address will be printed in the Serial Monitor as shown in the image above.<\/li><li>Make sure to save your board&#8217;s MAC address.<\/li><li>This process ensures that each ESP32 device is uniquely identified, facilitating efficient and targeted communication within an ESP-NOW network.<\/li><\/ul>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-acd2355 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"acd2355\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-01f9ad9\" data-id=\"01f9ad9\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-feb7501 elementor-widget elementor-widget-text-editor\" data-id=\"feb7501\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<blockquote><p><span style=\"font-size: 18pt; font-style: normal;\"><strong>ESP32 Sender Code<\/strong><\/span><\/p><\/blockquote>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-53abe55 elementor-widget elementor-widget-text-editor\" data-id=\"53abe55\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div style=\"background-color: #f5f5f5; border: 1px solid #cccccc; border-radius: 4px; padding: 15px; margin-bottom: 15px;\">#include\u00a0&lt;esp_now.h&gt;<br \/>#include\u00a0&lt;WiFi.h&gt;<br \/>#define buttonPin 6<br \/>\/\/replace your board mac address<br \/>uint8_t broadcastAddress1[] = {0xC8, 0xF0, 0x9E, 0XA6, 0x0A, 0x18};<br \/>typedef struct test_struct {<br \/>int buttonPress;<br \/>} test_struct;<br \/>test_struct test;<br \/>esp_now_peer_info_t peerInfo;<br \/>void DataSent (const uint8_t *mac_addr, esp_now_send_status_t status)<br \/>{<br \/>Serial.print(&#8221; send status:\\t&#8221;);<br \/>Serial.println(status == ESP_NOW_SEND_SUCCESS ? &#8220;Delivery Success&#8221; : &#8220;Delivery<br \/>Fail&#8221;);<br \/>}<br \/>void setup()<br \/>{<br \/>Serial.begin(115200);<br \/>pinMode(buttonPin, INPUT_PULLUP);<br \/>WiFi.mode(WIFI_STA);<br \/>if (esp_now_init() != ESP_OK)<br \/>{<br \/>Serial.println(&#8220;Error initializing ESP-NOW&#8221;);<br \/>return;<br \/>}<br \/>esp_now_register_send_cb(DataSent);<br \/>peerInfo.channel = 0;<br \/>peerInfo.encrypt = false;<br \/>memcpy(peerInfo.peer_addr, broadcastAddress1, 6);<br \/>if (esp_now_add_peer(&amp;peerInfo) != ESP_OK)<br \/>{<br \/>Serial.println(&#8220;Failed to add peer&#8221;);<br \/>return;<br \/>}<br \/>}<br \/>void loop()<br \/>{<br \/>int buttonState = digitalRead(buttonPin);<br \/>if (buttonState == LOW)<br \/>{<br \/>buttonState = digitalRead(buttonPin);<br \/>if (buttonState == LOW)<br \/>{<br \/>test.buttonPress = 1;<br \/>}<br \/>}<br \/>else<br \/>{<br \/>test.buttonPress = 0;<br \/>}<br \/><span style=\"color: var( --e-global-color-text ); font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight );\">esp_err_t result = esp_now_send(0, (uint8_t *) &amp;test, sizeof(test_struct));<br \/><\/span><span style=\"color: var( --e-global-color-text ); font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight );\">delay(200);<br \/><\/span><span style=\"color: var( --e-global-color-text ); font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight );\">}<\/span><\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b3d7347 elementor-widget elementor-widget-text-editor\" data-id=\"b3d7347\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<blockquote><p><span style=\"font-size: 18pt; font-style: normal;\">Code Explanation<\/span><\/p><\/blockquote>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-afaa667 elementor-widget elementor-widget-text-editor\" data-id=\"afaa667\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h4>Sender Code<\/h4><h5>1. Button and Broadcast Address<\/h5><div>We start by defining the button pin (buttonPin) and the unique address of the receiver (broadcastAddress1).<\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-765e1c7 elementor-widget elementor-widget-text-editor\" data-id=\"765e1c7\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div style=\"background-color: #f5f5f5; border: 1px solid #cccccc; border-radius: 4px; padding: 15px; margin-bottom: 15px;\">#define buttonPin 6<br \/>uint8_t broadcastAddress1[] = {0xC8, 0xF0, 0x9E, 0XA6, 0x0A, 0x18};<\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5cb177e elementor-widget elementor-widget-text-editor\" data-id=\"5cb177e\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h5>2. Data Structure<\/h5><div>A data structure named test_struct is created to hold the button press state (buttonPress).<\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c585539 elementor-widget elementor-widget-text-editor\" data-id=\"c585539\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div style=\"background-color: #f5f5f5; border: 1px solid #cccccc; border-radius: 4px; padding: 15px; margin-bottom: 15px;\">typedef struct test_struct {<br \/>int buttonPress;<br \/>} <br \/>test_struct;<br \/>test_struct test;<\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f564bc0 elementor-widget elementor-widget-text-editor\" data-id=\"f564bc0\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h5>3. ESP-NOW Initialization<\/h5><div><div>Initialization of the ESP-NOW library is done using esp_now_init(), and callback functions for sending\u00a0<span style=\"color: var( --e-global-color-text ); font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight );\">and receiving data are set.<\/span><\/div><\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7627fed elementor-widget elementor-widget-text-editor\" data-id=\"7627fed\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div style=\"background-color: #f5f5f5; border: 1px solid #cccccc; border-radius: 4px; padding: 15px; margin-bottom: 15px;\">WiFi.mode(WIFI_STA);<br \/>if (esp_now_init () != ESP_OK)<br \/>{<br \/>Serial.println(&#8220;Error initializing ESP-NOW&#8221;);<br \/>return;<br \/>}<\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a2669c4 elementor-widget elementor-widget-text-editor\" data-id=\"a2669c4\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h5>4. Adding Peer<\/h5><div><div>The receiver is configured as a peer using esp_now_add_peer(), specifying the communication<\/div><div>channel and encryption status.<\/div><\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f40dd00 elementor-widget elementor-widget-text-editor\" data-id=\"f40dd00\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div style=\"background-color: #f5f5f5; border: 1px solid #cccccc; border-radius: 4px; padding: 15px; margin-bottom: 15px;\">esp_now_peer_info_t peerInfo;<br \/>peerInfo.channel = 0;<br \/>peerInfo.encrypt = false;<br \/>memcpy(peerInfo.peer_addr, broadcastAddress1, 6);<br \/>if (esp_now_add_peer(&amp;peerInfo) != ESP_OK)<br \/>{<br \/>Serial.println(&#8220;Failed to add peer&#8221;);<br \/>return;<br \/>}<\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-454d8dd elementor-widget elementor-widget-text-editor\" data-id=\"454d8dd\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h5>5. Button State and Data Preparation<\/h5><div>The sender monitors the button state, updating test.buttonPress accordingly.<\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b55c9e7 elementor-widget elementor-widget-text-editor\" data-id=\"b55c9e7\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div style=\"background-color: #f5f5f5; border: 1px solid #cccccc; border-radius: 4px; padding: 15px; margin-bottom: 15px;\">int buttonState = digitalRead(buttonPin);<br \/>if (buttonState == LOW)<br \/>{<br \/>buttonState = digitalRead(buttonPin);<br \/>if (buttonState == LOW)<br \/>{<br \/>test.buttonPress = 1;<br \/>}<br \/>}<br \/>else<br \/>{<br \/>test.buttonPress = 0;<br \/>}<\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b01b910 elementor-widget elementor-widget-text-editor\" data-id=\"b01b910\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h5>6. Sending Data<\/h5><div>Data is sent to the receiver using esp_now_send()<\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2669bcf elementor-widget elementor-widget-text-editor\" data-id=\"2669bcf\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div style=\"background-color: #f5f5f5; border: 1px solid #cccccc; border-radius: 4px; padding: 15px; margin-bottom: 15px;\">esp_err_t result = esp_now_send(0, (uint8_t *) &amp;test, sizeof(test_struct));<br \/>delay(200);<\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8338f03 elementor-widget elementor-widget-text-editor\" data-id=\"8338f03\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h4>Code Explanation Summary:<\/h4>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f9da314 elementor-widget elementor-widget-text-editor\" data-id=\"f9da314\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<ul><li><b>esp_now_init():<\/b> Initializes the ESP-NOW library.<\/li><li><b>esp_now_register_send_cb():<\/b> Registers a callback function to handle the event when data is successfully sent.<\/li><li><b>esp_now_add_peer():<\/b> Adds the receiver as a peer, specifying the communication channel and encryption status.<\/li><li><b>DataSent():<\/b> Callback function to print the delivery status of the sent data.<\/li><li><b>loop(): <\/b>Monitors the button state and sends the button press information to the receiver using <b>esp_now_send().<\/b><\/li><\/ul>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-28850c1 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"28850c1\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-1e28099\" data-id=\"1e28099\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-9ef0941 elementor-widget elementor-widget-text-editor\" data-id=\"9ef0941\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>ESP32 Receiver Code<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-2e11547 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"2e11547\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-13c7e8f\" data-id=\"13c7e8f\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-fb21729 elementor-widget elementor-widget-text-editor\" data-id=\"fb21729\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<blockquote><p><span style=\"font-style: normal; font-size: 18pt;\">ESP32 Receiver Code<\/span><\/p><\/blockquote>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5dcd8a8 elementor-widget elementor-widget-text-editor\" data-id=\"5dcd8a8\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div style=\"background-color: #f5f5f5; border: 1px solid #cccccc; border-radius: 4px; padding: 15px; margin-bottom: 15px;\">#include\u00a0&lt;esp_now.h&gt;<br \/>#include\u00a0&lt;WiFi.h&gt;<br \/>#define ledPin 4<br \/>typedef struct test_struct {<br \/>int buttonPress;<br \/>} test_struct;<br \/>test_struct myData;<br \/>bool ledState = false;<br \/>bool lastButtonState = false;<br \/>void DataRecv (const uint8_t *mac, const uint8_t *incomingData, int len)<br \/>{<br \/>memcpy(&amp;myData, incomingData, sizeof(myData));<br \/>Serial.print(&#8220;buttonPress: &#8220;);<br \/>uint8_t buttonState = myData.buttonPress;<br \/>Serial.println(buttonState);<br \/>if (buttonState == 1 &amp;&amp; !lastButtonState)<br \/>{<br \/>ledState = !ledState;<br \/>digitalWrite(ledPin, ledState ? HIGH : LOW);<br \/>lastButtonState = true;<br \/>}<br \/>else if (buttonState == 0)<br \/>{<br \/>lastButtonState = false;<br \/>}<br \/>}<br \/>void setup()<br \/>{<br \/>Serial.begin(115200);<br \/>pinMode(ledPin, OUTPUT);<br \/>WiFi.mode(WIFI_STA);<br \/>if (esp_now_init() != ESP_OK)<br \/>{<br \/>Serial.println(&#8220;Error initializing ESP-NOW&#8221;);<br \/>return;<br \/>}<br \/>esp_now_register_recv_cb(DataRecv);<br \/>}<br \/>void loop()<br \/>{}<\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-087febb elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"087febb\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-63457e4\" data-id=\"63457e4\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-8832600 elementor-widget elementor-widget-text-editor\" data-id=\"8832600\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h3>Code Explanation<\/h3><h5>Receiver Code<\/h5><h5>1. LED and Data Structure<\/h5><div>The receiver code defines the LED pin (ledPin) and creates a myData structure to store received data.<\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d87a6b4 elementor-widget elementor-widget-text-editor\" data-id=\"d87a6b4\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div style=\"background-color: #f5f5f5; border: 1px solid #cccccc; border-radius: 4px; padding: 15px; margin-bottom: 15px;\">#define ledPin 4<br \/>typedef struct test_struct {<br \/>int buttonPress;<br \/>} test_struct;<br \/>test_struct myData;<br \/>bool ledState = false;<br \/>bool lastButtonState = false;<\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-93e1429 elementor-widget elementor-widget-text-editor\" data-id=\"93e1429\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h5>2. ESP-NOW Initialization<\/h5><div><div>Similar to the sender, the receiver initializes ESP-NOW and registers a callback function for receiving\u00a0<span style=\"color: var( --e-global-color-text ); font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight );\">data.<\/span><\/div><\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9467f2f elementor-widget elementor-widget-text-editor\" data-id=\"9467f2f\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div style=\"background-color: #f5f5f5; border: 1px solid #cccccc; border-radius: 4px; padding: 15px; margin-bottom: 15px;\">WiFi.mode(WIFI_STA);<br \/>if (esp_now_init() != ESP_OK)<br \/>{<br \/>Serial.println(&#8220;Error initializing ESP-NOW&#8221;);<br \/>return;<br \/>}<br \/><p>\u00a0<\/p><\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-216a754 elementor-widget elementor-widget-text-editor\" data-id=\"216a754\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h5 style=\"box-sizing: border-box; margin: 0px 0px 1.4rem; font-weight: bold; line-height: 1.3; font-size: 20px; font-family: Montserrat, sans-serif; letter-spacing: -0.05em; color: #212121; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;\">3. ledState and lastButtonState<\/h5><div><div>The receiver defines ledState to control the LED and lastButtonState to track the previous button<\/div><div>press.<\/div><\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-27b9263 elementor-widget elementor-widget-text-editor\" data-id=\"27b9263\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div style=\"background-color: #f5f5f5; border: 1px solid #cccccc; border-radius: 4px; padding: 15px; margin-bottom: 15px;\">bool ledState = false;<br \/>bool lastButtonState = false;<\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3514cc0 elementor-widget elementor-widget-text-editor\" data-id=\"3514cc0\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div style=\"box-sizing: border-box; color: #7a7a7a; font-family: Roboto, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;\">\u00a0<\/div><h5 style=\"box-sizing: border-box; margin: 0px 0px 1.4rem; font-weight: bold; line-height: 1.3; font-size: 20px; font-family: Montserrat, sans-serif; letter-spacing: -0.05em; color: #212121; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; background-color: #ffffff;\">4. OnDataRecv Callback<\/h5><div><div>This callback function is invoked when data is received. It processes the received data and controls<\/div><div>the LED based on the button press information.<\/div><\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c57e4dd elementor-widget elementor-widget-text-editor\" data-id=\"c57e4dd\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div style=\"background-color: #f5f5f5; border: 1px solid #cccccc; border-radius: 4px; padding: 15px; margin-bottom: 15px;\">void DataRecv (const uint8_t *mac, const uint8_t *incomingData, int len)<br \/>{<br \/>memcpy(&amp;myData, incomingData, sizeof(myData));<br \/>Serial.print(&#8220;buttonPress: &#8220;);<br \/>uint8_t buttonState = myData.buttonPress;<br \/>Serial.println(buttonState);<br \/>if (buttonState == 1 &amp;&amp; !lastButtonState)<br \/>{<br \/>ledState = !ledState;<br \/>digitalWrite(ledPin, ledState ? HIGH : LOW);<br \/>lastButtonState = true;<br \/>}<br \/>else if (buttonState == 0)<br \/>{<br \/>lastButtonState = false;<br \/>}<br \/>}<\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-5ef5da6 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"5ef5da6\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-eeed42e\" data-id=\"eeed42e\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-67e8d6b elementor-widget elementor-widget-text-editor\" data-id=\"67e8d6b\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h4>Code Explanation Summary:<\/h4>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ceb8e55 elementor-widget elementor-widget-text-editor\" data-id=\"ceb8e55\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<ul><li><b>esp_now_init():<\/b> Initializes the ESP-NOW library.<\/li><li><b>esp_now_register_recv_cb():<\/b> Registers a callback function to handle the event when data is received.<\/li><li><b>DataRecv():<\/b> Callback function to process the received data and control the LED based on the button press information.<\/li><li><b>loop():<\/b> Empty loop, as all functionality is handled in the callback function<\/li><\/ul>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-690d7d9 elementor-widget elementor-widget-text-editor\" data-id=\"690d7d9\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<blockquote><p><span style=\"font-style: normal; font-size: 18pt;\">Testing ESP-NOW Communication<\/span><\/p><\/blockquote>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-499802d elementor-widget elementor-widget-text-editor\" data-id=\"499802d\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Upload the code to sender ESP32 board and the receiver ESP32 board.<\/p><p>Open the Serial Monitor for each board.<\/p><h5>Serial Monitor 1(Sender):<\/h5>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d38ca73 elementor-widget elementor-widget-image\" data-id=\"d38ca73\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"640\" height=\"459\" src=\"https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/Sender-768x551.png\" class=\"attachment-medium_large size-medium_large\" alt=\"\" loading=\"lazy\" srcset=\"https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/Sender-768x551.png 768w, https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/Sender-300x215.png 300w, https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/Sender.png 871w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-26ef2de elementor-widget elementor-widget-spacer\" data-id=\"26ef2de\" data-element_type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<style>\/*! elementor - v3.8.0 - 30-10-2022 *\/\n.elementor-column .elementor-spacer-inner{height:var(--spacer-size)}.e-con{--container-widget-width:100%}.e-con-inner>.elementor-widget-spacer,.e-con>.elementor-widget-spacer{width:var(--container-widget-width,var(--spacer-size));-ms-flex-item-align:stretch;align-self:stretch;-ms-flex-negative:0;flex-shrink:0}.e-con-inner>.elementor-widget-spacer>.elementor-widget-container,.e-con-inner>.elementor-widget-spacer>.elementor-widget-container>.elementor-spacer,.e-con>.elementor-widget-spacer>.elementor-widget-container,.e-con>.elementor-widget-spacer>.elementor-widget-container>.elementor-spacer{height:100%}.e-con-inner>.elementor-widget-spacer>.elementor-widget-container>.elementor-spacer>.elementor-spacer-inner,.e-con>.elementor-widget-spacer>.elementor-widget-container>.elementor-spacer>.elementor-spacer-inner{height:var(--container-widget-height,var(--spacer-size))}<\/style>\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-26d1bdc elementor-widget elementor-widget-text-editor\" data-id=\"26d1bdc\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h5><span style=\"letter-spacing: -0.05em;\">Serial Monitor 2(Receiver):<\/span><br><\/h5>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ffebfd7 elementor-widget elementor-widget-image\" data-id=\"ffebfd7\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"640\" height=\"426\" src=\"https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/Recv-768x511.png\" class=\"attachment-medium_large size-medium_large\" alt=\"\" loading=\"lazy\" srcset=\"https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/Recv-768x511.png 768w, https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/Recv-300x199.png 300w, https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/Recv.png 913w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-802fb49 elementor-widget elementor-widget-text-editor\" data-id=\"802fb49\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>In summary, the exploration of ESP-NOW communication with ESP32 highlights its efficiency in one-<span style=\"color: var( --e-global-color-text ); font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight );\">way IoT communication. Developed by Espressif Systems, ESP-NOW offers a streamlined alternative\u00a0<\/span><span style=\"color: var( --e-global-color-text ); font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight );\">to Wi-Fi for direct ESP32 device communication. Features like encrypted support, 250-byte payload\u00a0<\/span><span style=\"color: var( --e-global-color-text ); font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight );\">capacity, and callback functions enhance its versatility. Despite some limitations, ESP-NOW excels\u00a0<\/span><span style=\"color: var( --e-global-color-text ); font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight );\">in fast, low-power communication.<\/span><\/p><p>The provided sender and receiver code examples showcase ESP-NOW&#8217;s simplicity for small data\u00a0<span style=\"color: var( --e-global-color-text ); font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight );\">transmission. Understanding MAC addresses ensures accurate communication between devices.\u00a0<\/span><span style=\"color: var( --e-global-color-text ); font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight );\">ESP-NOW&#8217;s speed, low power consumption, and easy setup make it an attractive choice for IoT\u00a0<\/span><span style=\"color: var( --e-global-color-text ); font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight );\">projects, promising seamless device interaction within the Internet of Things ecosystem.<\/span><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>The Internet of Things (IoT) The promise of IoT lies in everyday objects becoming interconnected, revolutionizing how we interactwith our environment. In the realm of IoT, wireless communication plays a crucial role by enabling devices to share datawithout cumbersome cables. While Wi-Fi is a popular choice, it can be complex and power-hungry for simpler tasks. [&hellip;]<\/p>\n <a href=\"https:\/\/www.niraltek.com\/blog\/exploring-esp-now-communication-with-esp32\/\" class=\"ReadMore\" title=\"Read More\">Read More<\/a>","protected":false},"author":11,"featured_media":2128,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v18.5.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Exploring ESP-NOW Communication with ESP32: One-Way Communication - Niraltek Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.niraltek.com\/blog\/exploring-esp-now-communication-with-esp32\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Exploring ESP-NOW Communication with ESP32: One-Way Communication - Niraltek Blog\" \/>\n<meta property=\"og:description\" content=\"The Internet of Things (IoT) The promise of IoT lies in everyday objects becoming interconnected, revolutionizing how we interactwith our environment. In the realm of IoT, wireless communication plays a crucial role by enabling devices to share datawithout cumbersome cables. While Wi-Fi is a popular choice, it can be complex and power-hungry for simpler tasks. [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.niraltek.com\/blog\/exploring-esp-now-communication-with-esp32\/\" \/>\n<meta property=\"og:site_name\" content=\"Niraltek Blog\" \/>\n<meta property=\"article:published_time\" content=\"2024-01-24T09:21:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-11T05:27:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/Akilan-blog-post.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2189\" \/>\n\t<meta property=\"og:image:height\" content=\"1173\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Akilan Js\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.niraltek.com\/blog\/#website\",\"url\":\"https:\/\/www.niraltek.com\/blog\/\",\"name\":\"Niraltek Blog\",\"description\":\"Niraltek, IOT, BLOGS\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.niraltek.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.niraltek.com\/blog\/exploring-esp-now-communication-with-esp32\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/Akilan-blog-post.jpg\",\"contentUrl\":\"https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/Akilan-blog-post.jpg\",\"width\":2189,\"height\":1173},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.niraltek.com\/blog\/exploring-esp-now-communication-with-esp32\/#webpage\",\"url\":\"https:\/\/www.niraltek.com\/blog\/exploring-esp-now-communication-with-esp32\/\",\"name\":\"Exploring ESP-NOW Communication with ESP32: One-Way Communication - Niraltek Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.niraltek.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.niraltek.com\/blog\/exploring-esp-now-communication-with-esp32\/#primaryimage\"},\"datePublished\":\"2024-01-24T09:21:39+00:00\",\"dateModified\":\"2024-03-11T05:27:50+00:00\",\"author\":{\"@id\":\"https:\/\/www.niraltek.com\/blog\/#\/schema\/person\/b3628862f35a01e7f35c370290e1f479\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.niraltek.com\/blog\/exploring-esp-now-communication-with-esp32\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.niraltek.com\/blog\/exploring-esp-now-communication-with-esp32\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.niraltek.com\/blog\/exploring-esp-now-communication-with-esp32\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.niraltek.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Exploring ESP-NOW Communication with ESP32: One-Way Communication\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.niraltek.com\/blog\/#\/schema\/person\/b3628862f35a01e7f35c370290e1f479\",\"name\":\"Akilan Js\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.niraltek.com\/blog\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a7e0faba5cd701f1b6abc3579e6ce6ad?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a7e0faba5cd701f1b6abc3579e6ce6ad?s=96&d=mm&r=g\",\"caption\":\"Akilan Js\"},\"url\":\"https:\/\/www.niraltek.com\/blog\/author\/akilan-js\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Exploring ESP-NOW Communication with ESP32: One-Way Communication - Niraltek Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.niraltek.com\/blog\/exploring-esp-now-communication-with-esp32\/","og_locale":"en_US","og_type":"article","og_title":"Exploring ESP-NOW Communication with ESP32: One-Way Communication - Niraltek Blog","og_description":"The Internet of Things (IoT) The promise of IoT lies in everyday objects becoming interconnected, revolutionizing how we interactwith our environment. In the realm of IoT, wireless communication plays a crucial role by enabling devices to share datawithout cumbersome cables. While Wi-Fi is a popular choice, it can be complex and power-hungry for simpler tasks. [&hellip;]","og_url":"https:\/\/www.niraltek.com\/blog\/exploring-esp-now-communication-with-esp32\/","og_site_name":"Niraltek Blog","article_published_time":"2024-01-24T09:21:39+00:00","article_modified_time":"2024-03-11T05:27:50+00:00","og_image":[{"width":2189,"height":1173,"url":"https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/Akilan-blog-post.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"Written by":"Akilan Js","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/www.niraltek.com\/blog\/#website","url":"https:\/\/www.niraltek.com\/blog\/","name":"Niraltek Blog","description":"Niraltek, IOT, BLOGS","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.niraltek.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https:\/\/www.niraltek.com\/blog\/exploring-esp-now-communication-with-esp32\/#primaryimage","inLanguage":"en-US","url":"https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/Akilan-blog-post.jpg","contentUrl":"https:\/\/www.niraltek.com\/blog\/wp-content\/uploads\/2024\/01\/Akilan-blog-post.jpg","width":2189,"height":1173},{"@type":"WebPage","@id":"https:\/\/www.niraltek.com\/blog\/exploring-esp-now-communication-with-esp32\/#webpage","url":"https:\/\/www.niraltek.com\/blog\/exploring-esp-now-communication-with-esp32\/","name":"Exploring ESP-NOW Communication with ESP32: One-Way Communication - Niraltek Blog","isPartOf":{"@id":"https:\/\/www.niraltek.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.niraltek.com\/blog\/exploring-esp-now-communication-with-esp32\/#primaryimage"},"datePublished":"2024-01-24T09:21:39+00:00","dateModified":"2024-03-11T05:27:50+00:00","author":{"@id":"https:\/\/www.niraltek.com\/blog\/#\/schema\/person\/b3628862f35a01e7f35c370290e1f479"},"breadcrumb":{"@id":"https:\/\/www.niraltek.com\/blog\/exploring-esp-now-communication-with-esp32\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.niraltek.com\/blog\/exploring-esp-now-communication-with-esp32\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.niraltek.com\/blog\/exploring-esp-now-communication-with-esp32\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.niraltek.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Exploring ESP-NOW Communication with ESP32: One-Way Communication"}]},{"@type":"Person","@id":"https:\/\/www.niraltek.com\/blog\/#\/schema\/person\/b3628862f35a01e7f35c370290e1f479","name":"Akilan Js","image":{"@type":"ImageObject","@id":"https:\/\/www.niraltek.com\/blog\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/a7e0faba5cd701f1b6abc3579e6ce6ad?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a7e0faba5cd701f1b6abc3579e6ce6ad?s=96&d=mm&r=g","caption":"Akilan Js"},"url":"https:\/\/www.niraltek.com\/blog\/author\/akilan-js\/"}]}},"_links":{"self":[{"href":"https:\/\/www.niraltek.com\/blog\/wp-json\/wp\/v2\/posts\/2104"}],"collection":[{"href":"https:\/\/www.niraltek.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.niraltek.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.niraltek.com\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.niraltek.com\/blog\/wp-json\/wp\/v2\/comments?post=2104"}],"version-history":[{"count":101,"href":"https:\/\/www.niraltek.com\/blog\/wp-json\/wp\/v2\/posts\/2104\/revisions"}],"predecessor-version":[{"id":2250,"href":"https:\/\/www.niraltek.com\/blog\/wp-json\/wp\/v2\/posts\/2104\/revisions\/2250"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.niraltek.com\/blog\/wp-json\/wp\/v2\/media\/2128"}],"wp:attachment":[{"href":"https:\/\/www.niraltek.com\/blog\/wp-json\/wp\/v2\/media?parent=2104"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.niraltek.com\/blog\/wp-json\/wp\/v2\/categories?post=2104"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.niraltek.com\/blog\/wp-json\/wp\/v2\/tags?post=2104"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}