[CC1101] Added packet counter
This commit is contained in:
parent
90368db27a
commit
4981ce9934
2 changed files with 5 additions and 2 deletions
|
@ -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() {
|
||||||
|
|
|
@ -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
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue