[CC1101] Added packet counter

This commit is contained in:
jgromes 2023-06-24 21:50:30 +02:00
parent 90368db27a
commit 4981ce9934
2 changed files with 5 additions and 2 deletions

View file

@ -47,7 +47,7 @@ void setup() {
} }
} }
// use a counter to keep track of transmitted packets // counter to keep track of transmitted packets
int count = 0; int count = 0;
void loop() { void loop() {

View file

@ -80,6 +80,9 @@ void setFlag(void) {
transmittedFlag = true; transmittedFlag = true;
} }
// counter to keep track of transmitted packets
int count = 0;
void loop() { void loop() {
// check if the previous transmission finished // check if the previous transmission finished
if(transmittedFlag) { if(transmittedFlag) {
@ -113,7 +116,7 @@ void loop() {
// you can transmit C-string or Arduino string up to // you can transmit C-string or Arduino string up to
// 256 characters long // 256 characters long
transmissionState = radio.startTransmit("Hello World!"); transmissionState = radio.startTransmit("Hello World! #" + String(count++));
// you can also transmit byte array up to 256 bytes long // you can also transmit byte array up to 256 bytes long
/* /*