Skip to content

Commit 35d68c3

Browse files
committed
Adding better message to debug whats going on
1 parent f76585e commit 35d68c3

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

RF_test.ino

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,18 @@ public:
99
protected:
1010
virtual void HandleMessage(uint32_t sender, const void* data, uint8_t length)
1111
{
12-
Serial.println("Got Message");
12+
Serial.print(sender, DEC);
13+
Serial.print(" : ");
14+
Serial.println((const char*)data);
1315
}
1416
virtual void OnNewPeer(Peer* p)
1517
{
16-
SendMessage(p->address, "Hello", 6);
18+
if (!IsReady()) return;
19+
char buff[255];
20+
int len = snprintf(buff, 255, "Hello %u from %u", p->address, GetAddress());
21+
Serial.print("Sending message: ");
22+
Serial.println(buff);
23+
SendMessage(p->address, buff, len + 1);
1724
}
1825
};
1926

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy