Skip to content

lrajzer/ESP-Meshed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESP-Meshed

This library was creted by me and Bartek Szodny for a research paper we wrote which is available here.

Using this library

Installation

First add a library to Your PlatformIO project, either using the library registry or by adding the lines below to Your platformio.ini

lib_deps = rajzer/ESP Meshed@^0.0.2

You can then include the library as any other

#include <esp-meshed.h>

How to use

The library creates a singleton class with its own access method.

ESPMeshedNode* node = GetESPMeshedNode();

To send messages simply use the sendMessage method, it takes in a 12-bit adress, and up-to 245 bits of data.

int data[5] = {1, 2, 3, 4, 5};
int data_length = 5;
node->sendMessage(*data, data_length, peer_adress);

To establish what happends when a message is received, You can set a callback either when getting the instance, or by using the setter.

void recvHandler(uint8_t *data, uint8_t len, uint16_t from)
{
    // Something happens to Your data here...
}
node->setReceiveHandler(recvHandler);

Examples

To see more ways to use this library please checkout the examples provided in the examples directory.

About

Small library to extend ESP-NOW to support up to 4096 devices with a ton of features, like autopairing, encryption and speed selection

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages