Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

Latest commit

 

History

History
50 lines (40 loc) · 1.1 KB

README.md

File metadata and controls

50 lines (40 loc) · 1.1 KB

nExtSP

nower than ESP-Now

License: MIT

Why?

ESP-Now is nice, but when you need a really simple peer-to-peer like connection between two ESP32, it's still too complicated.
nExtSP solves this problem by using only four lines of code!

  1. NEXTSP nextsp;
  2. nextsp.begin(isServer,"43750697",&onCallback);
  3. nextsp.send("test");
  4. nextsp.update();

How?

  #include <nExtSP.h>

  NEXTSP nextsp;
  
  void onCallback(byte* b,int length){
  //...
  }
  
  void setup(){
  //            boolean, if esp32 is server or client
  //              |      choose a unique id for every pair
  //              |         |        register callback function
  //              v         v            v
  //...
  nextsp.begin(isServer,"43750697",&onCallback);
  //...
  }
  
  void loop(){
  //...
  nextsp.send("test");
  //...
  nextsp.update(); // call once every loop.
  //...
  }

See also example code in repository.

License