[CC1101] Renamed basic examples to _Blocking

pull/779/head
jgromes 2023-06-24 19:51:09 +02:00
rodzic 36530b00fc
commit ac78f31532
2 zmienionych plików z 35 dodań i 23 usunięć

Wyświetl plik

@ -1,5 +1,5 @@
/*
RadioLib CC1101 Receive Example
RadioLib CC1101 Blocking Receive Example
This example receives packets using CC1101 FSK radio module.
To successfully receive data, the following settings have to be the same
@ -9,6 +9,11 @@
- frequency deviation
- sync word
Using blocking receive is not recommended, as it will lead
to significant amount of timeouts, inefficient use of processor
time and can some miss packets!
Instead, interrupt receive is recommended.
For default module settings, see the wiki page
https://github.com/jgromes/RadioLib/wiki/Default-configuration#cc1101

Wyświetl plik

@ -1,5 +1,5 @@
/*
RadioLib CC1101 Transmit Example
RadioLib CC1101 Blocking Transmit Example
This example transmits packets using CC1101 FSK radio module.
Each packet contains up to 64 bytes of data, in the form of:
@ -7,6 +7,10 @@
- null-terminated char array (C-string)
- arbitrary binary data (byte array)
Using blocking transmit is not recommended, as it will lead
to inefficient use of processor time!
Instead, interrupt transmit is recommended.
For default module settings, see the wiki page
https://github.com/jgromes/RadioLib/wiki/Default-configuration#cc1101
@ -43,11 +47,14 @@ void setup() {
}
}
// use a counter to keep track of transmitted packets
int count = 0;
void loop() {
Serial.print(F("[CC1101] Transmitting packet ... "));
// you can transmit C-string or Arduino string up to 63 characters long
int state = radio.transmit("Hello World!");
int state = radio.transmit("Hello World! #" + String(count++));
// you can also transmit byte array up to 63 bytes long
/*