[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;
|
||||
|
||||
void loop() {
|
||||
|
|
|
@ -80,6 +80,9 @@ void setFlag(void) {
|
|||
transmittedFlag = true;
|
||||
}
|
||||
|
||||
// counter to keep track of transmitted packets
|
||||
int count = 0;
|
||||
|
||||
void loop() {
|
||||
// check if the previous transmission finished
|
||||
if(transmittedFlag) {
|
||||
|
@ -113,7 +116,7 @@ void loop() {
|
|||
|
||||
// you can transmit C-string or Arduino string up to
|
||||
// 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
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue