Dezibot 4
Loading...
Searching...
No Matches
Communication.h
Go to the documentation of this file.
1
2#ifndef Communication_h
3#define Communication_h
4#include <stdint.h>
5#include <Arduino.h>
6#include <painlessMesh.h>
7
8#define MESH_PREFIX "DEZIBOT_MESH"
9#define MESH_PASSWORD "somethingSneaky"
10#define MESH_PORT 5555
11
12
14public:
19 static void begin(void);
20
21 void setGroupNumber(uint32_t number);
22
23 void sendMessage(String msg);
24
25 void onReceive(void (*callbackFunc)(String &msg));
26private:
27 static void (*userCallback)(String &msg);
28 static void receivedCallback(uint32_t from, String &msg);
29 static uint32_t groupNumber;
30
31};
32#endif //Communication_h
void sendMessage(String msg)
void onReceive(void(*callbackFunc)(String &msg))
static void begin(void)
initialize the Mesh Compnent, must be called before the other methods are used.
void setGroupNumber(uint32_t number)