mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* ESP-NOW experiment with terminal-chat
This commit is contained in:
parent
f33e1b22b3
commit
7bd7bfb14a
6 changed files with 182 additions and 0 deletions
25
variants/espnow_c3/platformio.ini
Normal file
25
variants/espnow_c3/platformio.ini
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
|
||||
; ----------- Generic ESP32-C3 ------------
|
||||
|
||||
[env:Generic_C3_ESPNOW_terminal_chat]
|
||||
extends = esp32_base
|
||||
;board = esp32-c3-devkitm-1
|
||||
board = esp32-s3-devkitc-1
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-I variants/espnow_c3
|
||||
-D MAX_CONTACTS=100
|
||||
-D MAX_GROUP_CHANNELS=1
|
||||
-D ESPNOW_DEBUG_LOGGING=1
|
||||
; -D P_LORA_TX_LED=8
|
||||
-D P_LORA_TX_LED=35
|
||||
-D PIN_USER_BTN=0
|
||||
; -D MESH_PACKET_LOGGING=1
|
||||
; -D MESH_DEBUG=1
|
||||
build_src_filter = ${esp32_base.build_src_filter}
|
||||
+<../examples/simple_secure_chat/main.cpp>
|
||||
+<helpers/esp32/ESPNowRadio.cpp>
|
||||
+<../variants/espnow_c3>
|
||||
lib_deps =
|
||||
${esp32_base.lib_deps}
|
||||
densaugeo/base64 @ ~1.4.0
|
||||
11
variants/espnow_c3/target.cpp
Normal file
11
variants/espnow_c3/target.cpp
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#include <Arduino.h>
|
||||
#include "target.h"
|
||||
|
||||
ESP32Board board;
|
||||
|
||||
ESPNOWRadio radio;
|
||||
|
||||
bool radio_init() {
|
||||
radio.begin();
|
||||
return true; // success
|
||||
}
|
||||
9
variants/espnow_c3/target.h
Normal file
9
variants/espnow_c3/target.h
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include <helpers/ESP32Board.h>
|
||||
#include <helpers/esp32/ESPNOWRadio.h>
|
||||
|
||||
extern ESP32Board board;
|
||||
extern ESPNOWRadio radio;
|
||||
|
||||
bool radio_init();
|
||||
Loading…
Add table
Add a link
Reference in a new issue