初始化提交

This commit is contained in:
王立帮
2024-07-20 22:09:06 +08:00
commit c247dd07a6
6876 changed files with 2743096 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
//************************************************************
// this is a simple example that uses the easyMesh library
//
// 1. blinks led once for every node on the mesh
// 2. blink cycle repeats every BLINK_PERIOD
// 3. sends a silly message to every node on the mesh at a random time between 1
// and 5 seconds
// 4. prints anything it receives to Serial.print
//
//
//************************************************************
#include <painlessMesh.h>
#include "painlessmesh/ota.hpp"
#include "painlessmesh/protocol.hpp"
#include "plugin/performance.hpp"
#define MESH_SSID "otatest"
#define MESH_PASSWORD "somethingSneaky"
#define MESH_PORT 5555
using namespace painlessmesh;
painlessMesh mesh;
void setup() {
Serial.begin(115200);
mesh.setDebugMsgTypes(
ERROR | CONNECTION |
DEBUG); // set before init() so that you can see error messages
mesh.init(MESH_SSID, MESH_PASSWORD, MESH_PORT, WIFI_AP_STA, 6);
mesh.initOTA("performance");
plugin::performance::begin(mesh, 2);
}
void loop() { mesh.update(); }

View File

@@ -0,0 +1,20 @@
[platformio]
src_dir = .
lib_extra_dirs = .piolibdeps/, ../../
[env:nodemcuv2]
platform = espressif8266
board = nodemcuv2
framework = arduino
lib_deps = ArduinoJson
TaskScheduler
ESPAsyncTCP
[env:esp32]
platform = espressif32
board = esp32dev
framework = arduino
lib_deps = ArduinoJson
arduinoUnity
TaskScheduler
AsyncTCP