Skip to content

Commit

Permalink
4-12: Add example 4_12_ESP_NOW to demonstrate ESP-NOW startup & shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeLeahy2 committed Dec 2, 2024
1 parent 80564e5 commit 097dcb1
Show file tree
Hide file tree
Showing 4 changed files with 965 additions and 0 deletions.
48 changes: 48 additions & 0 deletions Example_Sketches/4_12_ESP_NOW/4_12_ESP_NOW.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/**********************************************************************
4_12_ESP_NOW.ino
Example sketch to demonstrate ESP_NOW startup
**********************************************************************/

//****************************************
// Includes
//****************************************

#include <Arduino.h> // Built-in
#include <ESPmDNS.h> // Built-in
#include <MacAddress.h> // Built-in
#include <Network.h> // Built-in
#include <WiFi.h> // Built-in

#include "esp_now.h" // IDF built-in
#include "esp_mac.h" // IDF built-in
#include <esp_wifi.h> // IDF built-in
#include "esp_wifi_types.h" // IDF built-in

#include <secrets.h> // Host name, SSIDs and passwords

bool RTK_CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC = false;

#define systemPrintf Serial.printf
#define systemPrintln Serial.println

//****************************************
// WiFi class
//****************************************

//*********************************************************************
// Entry point for the application
void setup()
{
// Initialize the USB serial port
Serial.begin(115200);
systemPrintln();
systemPrintf(__FILE__ "\r\n");
}

//*********************************************************************
// Idle loop for core 1 of the application
void loop()
{
espNowTest();
}
Loading

0 comments on commit 097dcb1

Please sign in to comment.