File tree 4 files changed +12
-5
lines changed
4 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 3
3
** /secrets.h
4
4
.DS_Store
5
5
.vs_code /
6
- .vscode /
6
+ .vscode /
7
+ rssi /
Original file line number Diff line number Diff line change @@ -90,11 +90,11 @@ void loop() {
90
90
bool runSensor (void *) {
91
91
bool result;
92
92
93
- string statusMessage = String (" QUACK QUACK QUACK QUACK" );
93
+ String statusMessage = String (" QUACK QUACK QUACK QUACK" );
94
94
Serial.print (" [MAMA] status data: " );
95
95
Serial.println (statusMessage);
96
96
97
- result = sendData (stringToByteVector (healthMessage ), status);
97
+ result = sendData (stringToByteVector (statusMessage ), status);
98
98
if (result) {
99
99
Serial.println (" [MAMA] runSensor ok." );
100
100
} else {
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ const int INTERVAL_MS = 10000; // for sending the counter message
10
10
#include < arduino-timer.h>
11
11
#include < CDP.h>
12
12
#include " FastLED.h"
13
+ #include < DuckRadio.h>
13
14
14
15
// Setup for W2812 (LED)
15
16
#define LED_TYPE WS2812
@@ -39,6 +40,7 @@ bool runGPS(void *);
39
40
40
41
// create a built-in mama duck
41
42
MamaDuck duck;
43
+ DuckRadio radio;
42
44
43
45
// create a timer with default settings
44
46
auto timer = timer_create_default();
@@ -73,7 +75,6 @@ void setup() {
73
75
Serial.println (" [MAMA] Setup OK!" );
74
76
}
75
77
76
-
77
78
std::vector<byte> stringToByteVector (const String& str) {
78
79
std::vector<byte> byteVec;
79
80
byteVec.reserve (str.length ());
@@ -233,4 +234,9 @@ bool runGPS() {
233
234
}
234
235
235
236
return true ;
237
+ }
238
+
239
+ void handleDuckData (std::vector<byte> packetBuffer) {
240
+ Serial.println (" [MAMA] got packet: " + stringToByteVector (packetBuffer.data (), packetBuffer.size ()));
241
+ processMessageFromDucks (packetBuffer);
236
242
}
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ description = DuckLink CDP examples
48
48
ARDUINOOTA
49
49
50
50
[env:local_cdp]
51
- lib_deps = C:\ Users\Berna\OneDrive\ Documents\Duck Code\ ClusterDuck-Protocol ; local CDP library
51
+ lib_deps = / Users/tqrahman/ Documents/Arduino/libraries/ ClusterDuck-Protocol ; local CDP library
52
52
53
53
[env:release_cdp]
54
54
lib_deps =
You can’t perform that action at this time.
0 commit comments