-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
4-12: Add example 4_12_ESP_NOW to demonstrate ESP-NOW startup & shutdown
- Loading branch information
Showing
4 changed files
with
965 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} |
Oops, something went wrong.