Advertisement
pleasedontcode

ESP32 (Sub-Node) code

Jul 30th, 2024
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Arduino 0.33 KB | Source Code | 0 0
  1. #include <WiFi.h>
  2. #include <esp_mesh.h>
  3.  
  4. #define MESH_ID "ESP32_MESH_NETWORK"
  5.  
  6. void setup() {
  7.   Serial.begin(115200);
  8.   WiFi.mode(WIFI_AP_STA);
  9.  
  10.   mesh_init();
  11.   mesh_set_router(MESH_ID, "your_ssid", "your_password");
  12.  
  13.   esp_mesh_start();
  14.   Serial.println("Sub-node started");
  15. }
  16.  
  17. void loop() {
  18.   // Sub-node logic
  19. }
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement