Dezibot 4
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 
14 public:
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));
26 private:
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
Communication::sendMessage
void sendMessage(String msg)
Definition: Communication.cpp:10
Communication::onReceive
void onReceive(void(*callbackFunc)(String &msg))
Definition: Communication.cpp:64
Communication
Definition: Communication.h:13
Communication::setGroupNumber
void setGroupNumber(uint32_t number)
Definition: Communication.cpp:59
Communication::begin
static void begin(void)
initialize the Mesh Compnent, must be called before the other methods are used.
Definition: Communication.cpp:69