diff --git a/examples/AFSK/AFSK_External_Radio/AFSK_External_Radio.ino b/examples/AFSK/AFSK_External_Radio/AFSK_External_Radio.ino index 9419157b..012d1e20 100644 --- a/examples/AFSK/AFSK_External_Radio/AFSK_External_Radio.ino +++ b/examples/AFSK/AFSK_External_Radio/AFSK_External_Radio.ino @@ -1,19 +1,19 @@ /* - RadioLib AFSK External Radio example + RadioLib AFSK External Radio example - This example shows how to use your Arduino - as modulator for an external analogue FM radio. - - The example sends APRS position reports with - audio modulated as AFSK at 1200 baud using - Bell 202 tones. However, any other AFSK - protocol (RTTY, SSTV, etc.) may be used as well. + This example shows how to use your Arduino + as modulator for an external analogue FM radio. + + The example sends APRS position reports with + audio modulated as AFSK at 1200 baud using + Bell 202 tones. However, any other AFSK + protocol (RTTY, SSTV, etc.) may be used as well. - DO NOT transmit in APRS bands unless - you have a ham radio license! + DO NOT transmit in APRS bands unless + you have a ham radio license! - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library diff --git a/examples/AFSK/AFSK_Imperial_March/AFSK_Imperial_March.ino b/examples/AFSK/AFSK_Imperial_March/AFSK_Imperial_March.ino index 5b19bedf..c52dbe5f 100644 --- a/examples/AFSK/AFSK_Imperial_March/AFSK_Imperial_March.ino +++ b/examples/AFSK/AFSK_Imperial_March/AFSK_Imperial_March.ino @@ -1,21 +1,21 @@ /* - RadioLib AFSK Imperial March Example + RadioLib AFSK Imperial March Example - This example shows how to EXECUTE ORDER 66 + This example shows how to EXECUTE ORDER 66 - Other modules that can be used for AFSK: - - SX127x/RFM9x - - RF69 - - SX1231 - - CC1101 - - Si443x/RFM2x - - SX126x/LLCC68 + Other modules that can be used for AFSK: + - SX127x/RFM9x + - RF69 + - SX1231 + - CC1101 + - Si443x/RFM2x + - SX126x/LLCC68 - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library diff --git a/examples/AFSK/AFSK_Imperial_March/melody.h b/examples/AFSK/AFSK_Imperial_March/melody.h index 2f70f129..64023de9 100644 --- a/examples/AFSK/AFSK_Imperial_March/melody.h +++ b/examples/AFSK/AFSK_Imperial_March/melody.h @@ -1,7 +1,7 @@ /* - Note definitions, melody and melody-related functions - adapted from https://github.com/robsoncouto/arduino-songs - by Robson Couto, 2019 + Note definitions, melody and melody-related functions + adapted from https://github.com/robsoncouto/arduino-songs + by Robson Couto, 2019 */ #define NOTE_B0 31 diff --git a/examples/AFSK/AFSK_Tone/AFSK_Tone.ino b/examples/AFSK/AFSK_Tone/AFSK_Tone.ino index ad6738a1..ace10501 100644 --- a/examples/AFSK/AFSK_Tone/AFSK_Tone.ino +++ b/examples/AFSK/AFSK_Tone/AFSK_Tone.ino @@ -1,22 +1,22 @@ /* - RadioLib AFSK Example + RadioLib AFSK Example - This example shows hot to send audio FSK tones - using SX1278's FSK modem. + This example shows hot to send audio FSK tones + using SX1278's FSK modem. - Other modules that can be used for AFSK: - - SX127x/RFM9x - - RF69 - - SX1231 - - CC1101 - - Si443x/RFM2x - - SX126x/LLCC68 + Other modules that can be used for AFSK: + - SX127x/RFM9x + - RF69 + - SX1231 + - CC1101 + - Si443x/RFM2x + - SX126x/LLCC68 - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library diff --git a/examples/AFSK/AFSK_Tone_AM/AFSK_Tone_AM.ino b/examples/AFSK/AFSK_Tone_AM/AFSK_Tone_AM.ino index d11c8ad0..3ae965ba 100644 --- a/examples/AFSK/AFSK_Tone_AM/AFSK_Tone_AM.ino +++ b/examples/AFSK/AFSK_Tone_AM/AFSK_Tone_AM.ino @@ -1,20 +1,20 @@ /* - RadioLib AM-modulated AFSK Example + RadioLib AM-modulated AFSK Example - This example shows hot to send AM-modulated - audio FSK tones using SX1278's OOK modem. + This example shows hot to send AM-modulated + audio FSK tones using SX1278's OOK modem. - Other modules that can be used for AFSK: - - SX127x/RFM9x - - RF69 - - SX1231 - - CC1101 + Other modules that can be used for AFSK: + - SX127x/RFM9x + - RF69 + - SX1231 + - CC1101 - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library diff --git a/examples/APRS/APRS_MicE/APRS_MicE.ino b/examples/APRS/APRS_MicE/APRS_MicE.ino index 6500cac5..414f5f33 100644 --- a/examples/APRS/APRS_MicE/APRS_MicE.ino +++ b/examples/APRS/APRS_MicE/APRS_MicE.ino @@ -1,28 +1,28 @@ /* - RadioLib APRS Mic-E Example + RadioLib APRS Mic-E Example - This example sends APRS position reports - encoded in the Mic-E format using SX1278's - FSK modem. The data is modulated as AFSK - at 1200 baud using Bell 202 tones. + This example sends APRS position reports + encoded in the Mic-E format using SX1278's + FSK modem. The data is modulated as AFSK + at 1200 baud using Bell 202 tones. - DO NOT transmit in APRS bands unless - you have a ham radio license! + DO NOT transmit in APRS bands unless + you have a ham radio license! - Other modules that can be used for APRS: - - SX127x/RFM9x - - RF69 - - SX1231 - - CC1101 - - nRF24 - - Si443x/RFM2x - - SX126x/LLCC68 + Other modules that can be used for APRS: + - SX127x/RFM9x + - RF69 + - SX1231 + - CC1101 + - nRF24 + - Si443x/RFM2x + - SX126x/LLCC68 - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -35,9 +35,13 @@ // DIO1 pin: 3 SX1278 radio = new Module(10, 2, 9, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ // create AFSK client instance using the FSK module // this requires connection to the module direct diff --git a/examples/APRS/APRS_Position/APRS_Position.ino b/examples/APRS/APRS_Position/APRS_Position.ino index 4a43d37d..e1880484 100644 --- a/examples/APRS/APRS_Position/APRS_Position.ino +++ b/examples/APRS/APRS_Position/APRS_Position.ino @@ -1,28 +1,28 @@ /* - RadioLib APRS Position Example + RadioLib APRS Position Example - This example sends APRS position reports - using SX1278's FSK modem. The data is - modulated as AFSK at 1200 baud using Bell - 202 tones. + This example sends APRS position reports + using SX1278's FSK modem. The data is + modulated as AFSK at 1200 baud using Bell + 202 tones. - DO NOT transmit in APRS bands unless - you have a ham radio license! + DO NOT transmit in APRS bands unless + you have a ham radio license! - Other modules that can be used for APRS: - - SX127x/RFM9x - - RF69 - - SX1231 - - CC1101 - - nRF24 - - Si443x/RFM2x - - SX126x/LLCC68 + Other modules that can be used for APRS: + - SX127x/RFM9x + - RF69 + - SX1231 + - CC1101 + - nRF24 + - Si443x/RFM2x + - SX126x/LLCC68 - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -35,9 +35,13 @@ // DIO1 pin: 3 SX1278 radio = new Module(10, 2, 9, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ // create AFSK client instance using the FSK module // this requires connection to the module direct diff --git a/examples/APRS/APRS_Position_LoRa/APRS_Position_LoRa.ino b/examples/APRS/APRS_Position_LoRa/APRS_Position_LoRa.ino index 1a77aadb..b1cf8ad7 100644 --- a/examples/APRS/APRS_Position_LoRa/APRS_Position_LoRa.ino +++ b/examples/APRS/APRS_Position_LoRa/APRS_Position_LoRa.ino @@ -1,20 +1,20 @@ /* - RadioLib APRS Position over LoRa Example + RadioLib APRS Position over LoRa Example - This example sends APRS position reports - using SX1278's LoRa modem. + This example sends APRS position reports + using SX1278's LoRa modem. - Other modules that can be used for APRS: - - SX127x/RFM9x - - SX126x/LLCC68 - - SX128x - - LR11x0 + Other modules that can be used for APRS: + - SX127x/RFM9x + - SX126x/LLCC68 + - SX128x + - LR11x0 - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -27,9 +27,13 @@ // DIO1 pin: 3 SX1278 radio = new Module(10, 2, 9, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ // create APRS client instance using the LoRa radio APRSClient aprs(&radio); diff --git a/examples/AX25/AX25_Frames/AX25_Frames.ino b/examples/AX25/AX25_Frames/AX25_Frames.ino index 4c5fe47c..256e587b 100644 --- a/examples/AX25/AX25_Frames/AX25_Frames.ino +++ b/examples/AX25/AX25_Frames/AX25_Frames.ino @@ -1,31 +1,31 @@ /* - RadioLib AX.25 Frame Example + RadioLib AX.25 Frame Example - This example shows how to send various - AX.25 frames using SX1278's FSK modem. + This example shows how to send various + AX.25 frames using SX1278's FSK modem. - Other modules that can be used for AX.25: - - SX127x/RFM9x - - RF69 - - SX1231 - - CC1101 - - SX126x - - nRF24 - - Si443x/RFM2x - - LR11x0 + Other modules that can be used for AX.25: + - SX127x/RFM9x + - RF69 + - SX1231 + - CC1101 + - SX126x + - nRF24 + - Si443x/RFM2x + - LR11x0 - Using raw AX.25 frames requires some - knowledge of the protocol, refer to - AX25_Transmit for basic operation. - Frames shown in this example are not - exhaustive; all possible AX.25 frames - should be supported. + Using raw AX.25 frames requires some + knowledge of the protocol, refer to + AX25_Transmit for basic operation. + Frames shown in this example are not + exhaustive; all possible AX.25 frames + should be supported. - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -38,9 +38,13 @@ // DIO1 pin: 3 SX1278 radio = new Module(10, 2, 9, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ // create AX.25 client instance using the FSK module AX25Client ax25(&radio); diff --git a/examples/AX25/AX25_Transmit/AX25_Transmit.ino b/examples/AX25/AX25_Transmit/AX25_Transmit.ino index 1b0c7547..6d244ac2 100644 --- a/examples/AX25/AX25_Transmit/AX25_Transmit.ino +++ b/examples/AX25/AX25_Transmit/AX25_Transmit.ino @@ -1,24 +1,24 @@ /* - RadioLib AX.25 Transmit Example + RadioLib AX.25 Transmit Example - This example sends AX.25 messages using - SX1278's FSK modem. + This example sends AX.25 messages using + SX1278's FSK modem. - Other modules that can be used for AX.25: - - SX127x/RFM9x - - RF69 - - SX1231 - - CC1101 - - SX126x - - nRF24 - - Si443x/RFM2x - - LR11x0 + Other modules that can be used for AX.25: + - SX127x/RFM9x + - RF69 + - SX1231 + - CC1101 + - SX126x + - nRF24 + - Si443x/RFM2x + - LR11x0 - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -31,9 +31,13 @@ // DIO1 pin: 3 SX1278 radio = new Module(10, 2, 9, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ // create AX.25 client instance using the FSK module AX25Client ax25(&radio); diff --git a/examples/AX25/AX25_Transmit_AFSK/AX25_Transmit_AFSK.ino b/examples/AX25/AX25_Transmit_AFSK/AX25_Transmit_AFSK.ino index 2b27bdc6..b2288e69 100644 --- a/examples/AX25/AX25_Transmit_AFSK/AX25_Transmit_AFSK.ino +++ b/examples/AX25/AX25_Transmit_AFSK/AX25_Transmit_AFSK.ino @@ -1,25 +1,25 @@ /* - RadioLib AX.25 Transmit AFSK Example + RadioLib AX.25 Transmit AFSK Example - This example sends AX.25 messages using - SX1278's FSK modem. The data is modulated - as AFSK at 1200 baud using Bell 202 tones. + This example sends AX.25 messages using + SX1278's FSK modem. The data is modulated + as AFSK at 1200 baud using Bell 202 tones. - Other modules that can be used for AX.25 - with AFSK modulation: - - SX127x/RFM9x - - RF69 - - SX1231 - - CC1101 - - nRF24 - - Si443x/RFM2x - - SX126x/LLCC68 + Other modules that can be used for AX.25 + with AFSK modulation: + - SX127x/RFM9x + - RF69 + - SX1231 + - CC1101 + - nRF24 + - Si443x/RFM2x + - SX126x/LLCC68 - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -32,9 +32,13 @@ // DIO1 pin: 3 SX1278 radio = new Module(10, 2, 9, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ // create AFSK client instance using the FSK module // this requires connection to the module direct diff --git a/examples/BellModem/BellModem_Transmit/BellModem_Transmit.ino b/examples/BellModem/BellModem_Transmit/BellModem_Transmit.ino index 4b0e600e..abd96d4d 100644 --- a/examples/BellModem/BellModem_Transmit/BellModem_Transmit.ino +++ b/examples/BellModem/BellModem_Transmit/BellModem_Transmit.ino @@ -1,18 +1,18 @@ /* - RadioLib Bell Modem Transmit Example + RadioLib Bell Modem Transmit Example - This example shows how to transmit binary data - using audio Bell 202 tones. + This example shows how to transmit binary data + using audio Bell 202 tones. - Other implemented Bell modems - - Bell 101 - - Bell 103 + Other implemented Bell modems + - Bell 101 + - Bell 103 - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library diff --git a/examples/CC1101/CC1101_Receive_Address/CC1101_Receive_Address.ino b/examples/CC1101/CC1101_Receive_Address/CC1101_Receive_Address.ino index 9eeaca9b..11a6988d 100644 --- a/examples/CC1101/CC1101_Receive_Address/CC1101_Receive_Address.ino +++ b/examples/CC1101/CC1101_Receive_Address/CC1101_Receive_Address.ino @@ -1,17 +1,17 @@ /* - RadioLib CC1101 Receive with Address Example + RadioLib CC1101 Receive with Address Example - This example receives packets using CC1101 FSK radio - module. Packets can have 1-byte address of the - destination node. After setting node address, this node - will automatically filter out any packets that do not - contain either node address or broadcast addresses. + This example receives packets using CC1101 FSK radio + module. Packets can have 1-byte address of the + destination node. After setting node address, this node + will automatically filter out any packets that do not + contain either node address or broadcast addresses. - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#cc1101 + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#cc1101 - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -24,9 +24,13 @@ // GDO2 pin: 3 (optional) CC1101 radio = new Module(10, 2, RADIOLIB_NC, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//CC1101 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/CC1101/CC1101_Receive_Blocking/CC1101_Receive_Blocking.ino b/examples/CC1101/CC1101_Receive_Blocking/CC1101_Receive_Blocking.ino index 11edd45c..e24189c3 100644 --- a/examples/CC1101/CC1101_Receive_Blocking/CC1101_Receive_Blocking.ino +++ b/examples/CC1101/CC1101_Receive_Blocking/CC1101_Receive_Blocking.ino @@ -31,9 +31,13 @@ // GDO2 pin: 3 (optional) CC1101 radio = new Module(10, 2, RADIOLIB_NC, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//CC1101 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/CC1101/CC1101_Receive_Interrupt/CC1101_Receive_Interrupt.ino b/examples/CC1101/CC1101_Receive_Interrupt/CC1101_Receive_Interrupt.ino index 6b585fe5..1a6528d7 100644 --- a/examples/CC1101/CC1101_Receive_Interrupt/CC1101_Receive_Interrupt.ino +++ b/examples/CC1101/CC1101_Receive_Interrupt/CC1101_Receive_Interrupt.ino @@ -1,22 +1,22 @@ /* - RadioLib CC1101 Receive with Interrupts Example + RadioLib CC1101 Receive with Interrupts Example - This example listens for FSK transmissions and tries to - receive them. Once a packet is received, an interrupt is - triggered. + This example listens for FSK transmissions and tries to + receive them. Once a packet is received, an interrupt is + triggered. - To successfully receive data, the following settings have to be the same - on both transmitter and receiver: - - carrier frequency - - bit rate - - frequency deviation - - sync word + To successfully receive data, the following settings have to be the same + on both transmitter and receiver: + - carrier frequency + - bit rate + - frequency deviation + - sync word - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#cc1101 + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#cc1101 - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -29,9 +29,13 @@ // GDO2 pin: 3 (optional) CC1101 radio = new Module(10, 2, RADIOLIB_NC, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//CC1101 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/CC1101/CC1101_Settings/CC1101_Settings.ino b/examples/CC1101/CC1101_Settings/CC1101_Settings.ino index 8ba03b13..c3423e4b 100644 --- a/examples/CC1101/CC1101_Settings/CC1101_Settings.ino +++ b/examples/CC1101/CC1101_Settings/CC1101_Settings.ino @@ -1,21 +1,21 @@ /* - RadioLib CC1101 Settings Example + RadioLib CC1101 Settings Example - This example shows how to change all the properties of RF69 radio. - RadioLib currently supports the following settings: - - pins (SPI slave select, digital IO 0, digital IO 1) - - carrier frequency - - bit rate - - receiver bandwidth - - allowed frequency deviation - - output power during transmission - - sync word + This example shows how to change all the properties of RF69 radio. + RadioLib currently supports the following settings: + - pins (SPI slave select, digital IO 0, digital IO 1) + - carrier frequency + - bit rate + - receiver bandwidth + - allowed frequency deviation + - output power during transmission + - sync word - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#cc1101 + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#cc1101 - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -35,9 +35,13 @@ CC1101 radio1 = new Module(10, 2, RADIOLIB_NC, 3); // GDO2 pin: 5 (optional) CC1101 radio2 = new Module(9, 4, RADIOLIB_NC, 5); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//CC1101 radio3 = RadioShield.ModuleB; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio3 = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/CC1101/CC1101_Transmit_Address/CC1101_Transmit_Address.ino b/examples/CC1101/CC1101_Transmit_Address/CC1101_Transmit_Address.ino index ecdec620..37bc21f5 100644 --- a/examples/CC1101/CC1101_Transmit_Address/CC1101_Transmit_Address.ino +++ b/examples/CC1101/CC1101_Transmit_Address/CC1101_Transmit_Address.ino @@ -1,17 +1,17 @@ /* - RadioLib CC1101 Transmit to Address Example + RadioLib CC1101 Transmit to Address Example - This example transmits packets using CC1101 FSK radio - module. Packets can have 1-byte address of the - destination node. After setting node address, this node - will automatically filter out any packets that do not - contain either node address or broadcast addresses. + This example transmits packets using CC1101 FSK radio + module. Packets can have 1-byte address of the + destination node. After setting node address, this node + will automatically filter out any packets that do not + contain either node address or broadcast addresses. - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#cc1101 + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#cc1101 - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -24,9 +24,13 @@ // GDO2 pin: 3 (optional) CC1101 radio = new Module(10, 2, RADIOLIB_NC, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//CC1101 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/CC1101/CC1101_Transmit_Blocking/CC1101_Transmit_Blocking.ino b/examples/CC1101/CC1101_Transmit_Blocking/CC1101_Transmit_Blocking.ino index d42dbed6..52f4fb94 100644 --- a/examples/CC1101/CC1101_Transmit_Blocking/CC1101_Transmit_Blocking.ino +++ b/examples/CC1101/CC1101_Transmit_Blocking/CC1101_Transmit_Blocking.ino @@ -28,9 +28,13 @@ // GDO2 pin: 3 CC1101 radio = new Module(10, 2, RADIOLIB_NC, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//CC1101 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/CC1101/CC1101_Transmit_Interrupt/CC1101_Transmit_Interrupt.ino b/examples/CC1101/CC1101_Transmit_Interrupt/CC1101_Transmit_Interrupt.ino index 4e4e2a1f..049c9706 100644 --- a/examples/CC1101/CC1101_Transmit_Interrupt/CC1101_Transmit_Interrupt.ino +++ b/examples/CC1101/CC1101_Transmit_Interrupt/CC1101_Transmit_Interrupt.ino @@ -1,18 +1,18 @@ /* - RadioLib CC1101 Transmit with Interrupts Example + RadioLib CC1101 Transmit with Interrupts Example - This example transmits packets using CC1101 FSK radio module. - Once a packet is transmitted, an interrupt is triggered. - Each packet contains up to 64 bytes of data, in the form of: - - Arduino String - - null-terminated char array (C-string) - - arbitrary binary data (byte array) + This example transmits packets using CC1101 FSK radio module. + Once a packet is transmitted, an interrupt is triggered. + Each packet contains up to 64 bytes of data, in the form of: + - Arduino String + - null-terminated char array (C-string) + - arbitrary binary data (byte array) - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#cc1101 + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#cc1101 - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -25,9 +25,13 @@ // GDO2 pin: 3 CC1101 radio = new Module(10, 2, RADIOLIB_NC, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//CC1101 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ // save transmission state between loops int transmissionState = RADIOLIB_ERR_NONE; diff --git a/examples/FSK4/FSK4_Transmit/FSK4_Transmit.ino b/examples/FSK4/FSK4_Transmit/FSK4_Transmit.ino index 088f318b..d521b8a5 100644 --- a/examples/FSK4/FSK4_Transmit/FSK4_Transmit.ino +++ b/examples/FSK4/FSK4_Transmit/FSK4_Transmit.ino @@ -1,27 +1,27 @@ /* - RadioLib FSK4 Transmit Example + RadioLib FSK4 Transmit Example - This example sends an example FSK-4 'Horus Binary' message - using SX1278's FSK modem. + This example sends an example FSK-4 'Horus Binary' message + using SX1278's FSK modem. - This signal can be demodulated using a SSB demodulator (SDR or otherwise), - and horusdemodlib: https://github.com/projecthorus/horusdemodlib/wiki + This signal can be demodulated using a SSB demodulator (SDR or otherwise), + and horusdemodlib: https://github.com/projecthorus/horusdemodlib/wiki - Other modules that can be used for FSK4: - - SX127x/RFM9x - - RF69 - - SX1231 - - CC1101 - - SX126x - - nRF24 - - Si443x/RFM2x - - SX128x + Other modules that can be used for FSK4: + - SX127x/RFM9x + - RF69 + - SX1231 + - CC1101 + - SX126x + - nRF24 + - Si443x/RFM2x + - SX128x - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -34,9 +34,13 @@ // DIO1 pin: 3 SX1278 radio = new Module(10, 2, 9, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ // create FSK4 client instance using the FSK module FSK4Client fsk4(&radio); diff --git a/examples/FSK4/FSK4_Transmit_AFSK/FSK4_Transmit_AFSK.ino b/examples/FSK4/FSK4_Transmit_AFSK/FSK4_Transmit_AFSK.ino index c31877b4..58cc7aa9 100644 --- a/examples/FSK4/FSK4_Transmit_AFSK/FSK4_Transmit_AFSK.ino +++ b/examples/FSK4/FSK4_Transmit_AFSK/FSK4_Transmit_AFSK.ino @@ -1,25 +1,25 @@ /* - RadioLib FSK4 Transmit AFSK Example + RadioLib FSK4 Transmit AFSK Example - This example sends an example FSK-4 'Horus Binary' message - using SX1278's FSK modem. The data is modulated as AFSK. + This example sends an example FSK-4 'Horus Binary' message + using SX1278's FSK modem. The data is modulated as AFSK. - This signal can be demodulated using an FM demodulator (SDR or otherwise), - and horusdemodlib: https://github.com/projecthorus/horusdemodlib/wiki + This signal can be demodulated using an FM demodulator (SDR or otherwise), + and horusdemodlib: https://github.com/projecthorus/horusdemodlib/wiki - Other modules that can be used for FSK4: - - SX127x/RFM9x - - RF69 - - SX1231 - - CC1101 - - Si443x/RFM2x - - SX126x/LLCC68 + Other modules that can be used for FSK4: + - SX127x/RFM9x + - RF69 + - SX1231 + - CC1101 + - Si443x/RFM2x + - SX126x/LLCC68 - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -32,9 +32,13 @@ // DIO1 pin: 3 SX1278 radio = new Module(10, 2, 9, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ // create AFSK client instance using the FSK module // this requires connection to the module direct diff --git a/examples/Hellschreiber/Hellschreiber_Transmit/Hellschreiber_Transmit.ino b/examples/Hellschreiber/Hellschreiber_Transmit/Hellschreiber_Transmit.ino index af480409..ceebc924 100644 --- a/examples/Hellschreiber/Hellschreiber_Transmit/Hellschreiber_Transmit.ino +++ b/examples/Hellschreiber/Hellschreiber_Transmit/Hellschreiber_Transmit.ino @@ -1,25 +1,25 @@ /* - RadioLib Hellschreiber Transmit Example + RadioLib Hellschreiber Transmit Example - This example sends Hellschreiber message using - SX1278's FSK modem. + This example sends Hellschreiber message using + SX1278's FSK modem. - Other modules that can be used for Hellschreiber: - - SX127x/RFM9x - - RF69 - - SX1231 - - CC1101 - - SX126x - - nRF24 - - Si443x/RFM2x - - SX128x - - LR11x0 + Other modules that can be used for Hellschreiber: + - SX127x/RFM9x + - RF69 + - SX1231 + - CC1101 + - SX126x + - nRF24 + - Si443x/RFM2x + - SX128x + - LR11x0 - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -32,9 +32,13 @@ // DIO1 pin: 3 SX1278 radio = new Module(10, 2, 9, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ // create Hellschreiber client instance using the FSK module HellClient hell(&radio); diff --git a/examples/Hellschreiber/Hellschreiber_Transmit_AFSK/Hellschreiber_Transmit_AFSK.ino b/examples/Hellschreiber/Hellschreiber_Transmit_AFSK/Hellschreiber_Transmit_AFSK.ino index 77feff0d..14fb049a 100644 --- a/examples/Hellschreiber/Hellschreiber_Transmit_AFSK/Hellschreiber_Transmit_AFSK.ino +++ b/examples/Hellschreiber/Hellschreiber_Transmit_AFSK/Hellschreiber_Transmit_AFSK.ino @@ -1,24 +1,24 @@ /* - RadioLib Hellschreiber Transmit AFSK Example + RadioLib Hellschreiber Transmit AFSK Example - This example sends Hellschreiber message using - SX1278's FSK modem. The data is modulated - as AFSK. + This example sends Hellschreiber message using + SX1278's FSK modem. The data is modulated + as AFSK. - Other modules that can be used for Hellschreiber - with AFSK modulation: - - SX127x/RFM9x - - RF69 - - SX1231 - - CC1101 - - Si443x/RFM2x - - SX126x/LLCC68 + Other modules that can be used for Hellschreiber + with AFSK modulation: + - SX127x/RFM9x + - RF69 + - SX1231 + - CC1101 + - Si443x/RFM2x + - SX126x/LLCC68 - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -31,9 +31,13 @@ // DIO1 pin: 3 SX1278 radio = new Module(10, 2, 9, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ // create AFSK client instance using the FSK module // this requires connection to the module direct diff --git a/examples/LR11x0/LR11x0_Channel_Activity_Detection_Blocking/LR11x0_Channel_Activity_Detection_Blocking.ino b/examples/LR11x0/LR11x0_Channel_Activity_Detection_Blocking/LR11x0_Channel_Activity_Detection_Blocking.ino index 636b488f..81b3f7bd 100644 --- a/examples/LR11x0/LR11x0_Channel_Activity_Detection_Blocking/LR11x0_Channel_Activity_Detection_Blocking.ino +++ b/examples/LR11x0/LR11x0_Channel_Activity_Detection_Blocking/LR11x0_Channel_Activity_Detection_Blocking.ino @@ -34,6 +34,14 @@ // BUSY pin: 9 LR1110 radio = new Module(10, 2, 3, 9); +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ + // set RF switch configuration for Wio WM1110 // Wio WM1110 uses DIO5 and DIO6 for RF switching // NOTE: other boards may be different! diff --git a/examples/LR11x0/LR11x0_Channel_Activity_Detection_Interrupt/LR11x0_Channel_Activity_Detection_Interrupt.ino b/examples/LR11x0/LR11x0_Channel_Activity_Detection_Interrupt/LR11x0_Channel_Activity_Detection_Interrupt.ino index d4a79299..304bbc9d 100644 --- a/examples/LR11x0/LR11x0_Channel_Activity_Detection_Interrupt/LR11x0_Channel_Activity_Detection_Interrupt.ino +++ b/examples/LR11x0/LR11x0_Channel_Activity_Detection_Interrupt/LR11x0_Channel_Activity_Detection_Interrupt.ino @@ -29,6 +29,14 @@ // BUSY pin: 9 LR1110 radio = new Module(10, 2, 3, 9); +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ + // set RF switch configuration for Wio WM1110 // Wio WM1110 uses DIO5 and DIO6 for RF switching // NOTE: other boards may be different! diff --git a/examples/LR11x0/LR11x0_Firmware_Update/LR11x0_Firmware_Update.ino b/examples/LR11x0/LR11x0_Firmware_Update/LR11x0_Firmware_Update.ino index 8813b1da..03296fb4 100644 --- a/examples/LR11x0/LR11x0_Firmware_Update/LR11x0_Firmware_Update.ino +++ b/examples/LR11x0/LR11x0_Firmware_Update/LR11x0_Firmware_Update.ino @@ -48,9 +48,13 @@ // BUSY pin: 9 LR1110 radio = new Module(10, 2, 3, 9); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//LR1110 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/LR11x0/LR11x0_GFSK_Modem/LR11x0_GFSK_Modem.ino b/examples/LR11x0/LR11x0_GFSK_Modem/LR11x0_GFSK_Modem.ino index b49d394e..85e7bd45 100644 --- a/examples/LR11x0/LR11x0_GFSK_Modem/LR11x0_GFSK_Modem.ino +++ b/examples/LR11x0/LR11x0_GFSK_Modem/LR11x0_GFSK_Modem.ino @@ -26,9 +26,13 @@ // BUSY pin: 9 LR1110 radio = new Module(10, 2, 3, 9); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//LR1110 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/LR11x0/LR11x0_GNSS_Almanac_Update/LR11x0_GNSS_Almanac_Update.ino b/examples/LR11x0/LR11x0_GNSS_Almanac_Update/LR11x0_GNSS_Almanac_Update.ino index 964e865f..444ee657 100644 --- a/examples/LR11x0/LR11x0_GNSS_Almanac_Update/LR11x0_GNSS_Almanac_Update.ino +++ b/examples/LR11x0/LR11x0_GNSS_Almanac_Update/LR11x0_GNSS_Almanac_Update.ino @@ -33,6 +33,14 @@ // BUSY pin: 9 LR1110 radio = new Module(10, 2, 3, 9); +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ + // structure to save information about the GNSS almanac LR11x0GnssAlmanacStatus_t almStatus; diff --git a/examples/LR11x0/LR11x0_GNSS_Autonomous_Position/LR11x0_GNSS_Autonomous_Position.ino b/examples/LR11x0/LR11x0_GNSS_Autonomous_Position/LR11x0_GNSS_Autonomous_Position.ino index 84a40aa0..800a21b8 100644 --- a/examples/LR11x0/LR11x0_GNSS_Autonomous_Position/LR11x0_GNSS_Autonomous_Position.ino +++ b/examples/LR11x0/LR11x0_GNSS_Autonomous_Position/LR11x0_GNSS_Autonomous_Position.ino @@ -29,6 +29,14 @@ // BUSY pin: 9 LR1110 radio = new Module(10, 2, 3, 9); +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ + // structure to save information about the GNSS scan result LR11x0GnssResult_t gnssResult; diff --git a/examples/LR11x0/LR11x0_GNSS_Satellites/LR11x0_GNSS_Satellites.ino b/examples/LR11x0/LR11x0_GNSS_Satellites/LR11x0_GNSS_Satellites.ino index 4104a23f..bd84bc45 100644 --- a/examples/LR11x0/LR11x0_GNSS_Satellites/LR11x0_GNSS_Satellites.ino +++ b/examples/LR11x0/LR11x0_GNSS_Satellites/LR11x0_GNSS_Satellites.ino @@ -29,6 +29,14 @@ // BUSY pin: 9 LR1110 radio = new Module(10, 2, 3, 9); +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ + // structure to save information about the GNSS scan result LR11x0GnssResult_t gnssResult; diff --git a/examples/LR11x0/LR11x0_LR_FHSS_Modem/LR11x0_LR_FHSS_Modem.ino b/examples/LR11x0/LR11x0_LR_FHSS_Modem/LR11x0_LR_FHSS_Modem.ino index b858c963..a7de634d 100644 --- a/examples/LR11x0/LR11x0_LR_FHSS_Modem/LR11x0_LR_FHSS_Modem.ino +++ b/examples/LR11x0/LR11x0_LR_FHSS_Modem/LR11x0_LR_FHSS_Modem.ino @@ -27,9 +27,13 @@ // BUSY pin: 9 LR1110 radio = new Module(10, 2, 3, 9); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//LR1110 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/LR11x0/LR11x0_PingPong/LR11x0_PingPong.ino b/examples/LR11x0/LR11x0_PingPong/LR11x0_PingPong.ino index b494a3c2..b6b5e08d 100644 --- a/examples/LR11x0/LR11x0_PingPong/LR11x0_PingPong.ino +++ b/examples/LR11x0/LR11x0_PingPong/LR11x0_PingPong.ino @@ -22,6 +22,14 @@ // BUSY pin: 9 LR1110 radio = new Module(10, 2, 3, 9); +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ + // set RF switch configuration for Wio WM1110 // Wio WM1110 uses DIO5 and DIO6 for RF switching // NOTE: other boards may be different! diff --git a/examples/LR11x0/LR11x0_Receive_Blocking/LR11x0_Receive_Blocking.ino b/examples/LR11x0/LR11x0_Receive_Blocking/LR11x0_Receive_Blocking.ino index cf0736ff..aeb40679 100644 --- a/examples/LR11x0/LR11x0_Receive_Blocking/LR11x0_Receive_Blocking.ino +++ b/examples/LR11x0/LR11x0_Receive_Blocking/LR11x0_Receive_Blocking.ino @@ -39,6 +39,14 @@ // BUSY pin: 9 LR1110 radio = new Module(10, 2, 3, 9); +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ + // set RF switch configuration for Wio WM1110 // Wio WM1110 uses DIO5 and DIO6 for RF switching // NOTE: other boards may be different! diff --git a/examples/LR11x0/LR11x0_Receive_Interrupt/LR11x0_Receive_Interrupt.ino b/examples/LR11x0/LR11x0_Receive_Interrupt/LR11x0_Receive_Interrupt.ino index 4b9b946f..76b8919f 100644 --- a/examples/LR11x0/LR11x0_Receive_Interrupt/LR11x0_Receive_Interrupt.ino +++ b/examples/LR11x0/LR11x0_Receive_Interrupt/LR11x0_Receive_Interrupt.ino @@ -35,6 +35,14 @@ // BUSY pin: 9 LR1110 radio = new Module(10, 2, 3, 9); +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ + // set RF switch configuration for Wio WM1110 // Wio WM1110 uses DIO5 and DIO6 for RF switching // NOTE: other boards may be different! diff --git a/examples/LR11x0/LR11x0_Transmit_Blocking/LR11x0_Transmit_Blocking.ino b/examples/LR11x0/LR11x0_Transmit_Blocking/LR11x0_Transmit_Blocking.ino index 92045bdc..bad54bd1 100644 --- a/examples/LR11x0/LR11x0_Transmit_Blocking/LR11x0_Transmit_Blocking.ino +++ b/examples/LR11x0/LR11x0_Transmit_Blocking/LR11x0_Transmit_Blocking.ino @@ -30,6 +30,14 @@ // BUSY pin: 9 LR1110 radio = new Module(10, 2, 3, 9); +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ + // set RF switch configuration for Wio WM1110 // Wio WM1110 uses DIO5 and DIO6 for RF switching // NOTE: other boards may be different! diff --git a/examples/LR11x0/LR11x0_Transmit_Interrupt/LR11x0_Transmit_Interrupt.ino b/examples/LR11x0/LR11x0_Transmit_Interrupt/LR11x0_Transmit_Interrupt.ino index 67f5052b..2efdc263 100644 --- a/examples/LR11x0/LR11x0_Transmit_Interrupt/LR11x0_Transmit_Interrupt.ino +++ b/examples/LR11x0/LR11x0_Transmit_Interrupt/LR11x0_Transmit_Interrupt.ino @@ -31,6 +31,14 @@ // BUSY pin: 9 LR1110 radio = new Module(10, 2, 3, 9); +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ + // set RF switch configuration for Wio WM1110 // Wio WM1110 uses DIO5 and DIO6 for RF switching // NOTE: other boards may be different! diff --git a/examples/LR11x0/LR11x0_WiFi_Scan_Blocking/LR11x0_WiFi_Scan_Blocking.ino b/examples/LR11x0/LR11x0_WiFi_Scan_Blocking/LR11x0_WiFi_Scan_Blocking.ino index 1e07ffd2..53bafd36 100644 --- a/examples/LR11x0/LR11x0_WiFi_Scan_Blocking/LR11x0_WiFi_Scan_Blocking.ino +++ b/examples/LR11x0/LR11x0_WiFi_Scan_Blocking/LR11x0_WiFi_Scan_Blocking.ino @@ -32,6 +32,14 @@ // BUSY pin: 9 LR1110 radio = new Module(10, 2, 3, 9); +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ + // set RF switch configuration for Wio WM1110 // Wio WM1110 uses DIO5 and DIO6 for RF switching // NOTE: other boards may be different! diff --git a/examples/LR11x0/LR11x0_WiFi_Scan_Interrupt/LR11x0_WiFi_Scan_Interrupt.ino b/examples/LR11x0/LR11x0_WiFi_Scan_Interrupt/LR11x0_WiFi_Scan_Interrupt.ino index fdf08a9c..fcae902a 100644 --- a/examples/LR11x0/LR11x0_WiFi_Scan_Interrupt/LR11x0_WiFi_Scan_Interrupt.ino +++ b/examples/LR11x0/LR11x0_WiFi_Scan_Interrupt/LR11x0_WiFi_Scan_Interrupt.ino @@ -32,6 +32,14 @@ // BUSY pin: 9 LR1110 radio = new Module(10, 2, 3, 9); +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ + // set RF switch configuration for Wio WM1110 // Wio WM1110 uses DIO5 and DIO6 for RF switching // NOTE: other boards may be different! diff --git a/examples/Morse/Morse_Receive_AM/Morse_Receive_AM.ino b/examples/Morse/Morse_Receive_AM/Morse_Receive_AM.ino index 3b96d638..e4fb4037 100644 --- a/examples/Morse/Morse_Receive_AM/Morse_Receive_AM.ino +++ b/examples/Morse/Morse_Receive_AM/Morse_Receive_AM.ino @@ -1,23 +1,23 @@ /* - RadioLib SX127x Morse Receive AM Example + RadioLib SX127x Morse Receive AM Example - This example receives Morse code message using - SX1278's FSK modem. The signal is expected to be - modulated as OOK, to be demodulated in AM mode. + This example receives Morse code message using + SX1278's FSK modem. The signal is expected to be + modulated as OOK, to be demodulated in AM mode. - Other modules that can be used for Morse Code - with AFSK modulation: - - SX127x/RFM9x - - RF69 - - SX1231 - - CC1101 - - Si443x/RFM2x + Other modules that can be used for Morse Code + with AFSK modulation: + - SX127x/RFM9x + - RF69 + - SX1231 + - CC1101 + - Si443x/RFM2x - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -30,9 +30,13 @@ // DIO1 pin: 3 SX1278 radio = new Module(10, 2, 9, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ // create AFSK client instance using the FSK module // pin 5 is connected to SX1278 DIO2 diff --git a/examples/Morse/Morse_Transmit_AM/Morse_Transmit_AM.ino b/examples/Morse/Morse_Transmit_AM/Morse_Transmit_AM.ino index 3aeae2c9..b81ba861 100644 --- a/examples/Morse/Morse_Transmit_AM/Morse_Transmit_AM.ino +++ b/examples/Morse/Morse_Transmit_AM/Morse_Transmit_AM.ino @@ -1,23 +1,23 @@ /* - RadioLib Morse Transmit AM Example + RadioLib Morse Transmit AM Example - This example sends Morse code message using - SX1278's FSK modem. The signal is modulated - as OOK, and may be demodulated in AM mode. + This example sends Morse code message using + SX1278's FSK modem. The signal is modulated + as OOK, and may be demodulated in AM mode. - Other modules that can be used for Morse Code - with AM modulation: - - SX127x/RFM9x - - RF69 - - SX1231 - - CC1101 - - Si443x/RFM2x + Other modules that can be used for Morse Code + with AM modulation: + - SX127x/RFM9x + - RF69 + - SX1231 + - CC1101 + - Si443x/RFM2x - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -30,9 +30,13 @@ // DIO1 pin: 3 SX1278 radio = new Module(10, 2, 9, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ // create AFSK client instance using the FSK module // pin 5 is connected to SX1278 DIO2 diff --git a/examples/Morse/Morse_Transmit_FM/Morse_Transmit_FM.ino b/examples/Morse/Morse_Transmit_FM/Morse_Transmit_FM.ino index de955cc6..b4ba7865 100644 --- a/examples/Morse/Morse_Transmit_FM/Morse_Transmit_FM.ino +++ b/examples/Morse/Morse_Transmit_FM/Morse_Transmit_FM.ino @@ -1,24 +1,24 @@ /* - RadioLib Morse Transmit AFSK Example + RadioLib Morse Transmit AFSK Example - This example sends Morse code message using - SX1278's FSK modem. The signal is modulated - as AFSK, and may be demodulated in FM mode. + This example sends Morse code message using + SX1278's FSK modem. The signal is modulated + as AFSK, and may be demodulated in FM mode. - Other modules that can be used for Morse Code - with AFSK modulation: - - SX127x/RFM9x - - RF69 - - SX1231 - - CC1101 - - Si443x/RFM2x - - SX126x/LLCC68 + Other modules that can be used for Morse Code + with AFSK modulation: + - SX127x/RFM9x + - RF69 + - SX1231 + - CC1101 + - Si443x/RFM2x + - SX126x/LLCC68 - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -31,9 +31,13 @@ // DIO1 pin: 3 SX1278 radio = new Module(10, 2, 9, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ // create AFSK client instance using the FSK module // this requires connection to the module direct diff --git a/examples/Morse/Morse_Transmit_SSB/Morse_Transmit_SSB.ino b/examples/Morse/Morse_Transmit_SSB/Morse_Transmit_SSB.ino index cbc02796..f7615e20 100644 --- a/examples/Morse/Morse_Transmit_SSB/Morse_Transmit_SSB.ino +++ b/examples/Morse/Morse_Transmit_SSB/Morse_Transmit_SSB.ino @@ -1,26 +1,26 @@ /* - RadioLib Morse Transmit SSB Example + RadioLib Morse Transmit SSB Example - This example sends Morse code message using - SX1278's FSK modem. The signal is an unmodulated - carrier wave, and may be demodulated in SSB mode. + This example sends Morse code message using + SX1278's FSK modem. The signal is an unmodulated + carrier wave, and may be demodulated in SSB mode. - Other modules that can be used for Morse Code: - - SX127x/RFM9x - - RF69 - - SX1231 - - CC1101 - - SX126x - - nRF24 - - Si443x/RFM2x - - SX128x - - LR11x0 + Other modules that can be used for Morse Code: + - SX127x/RFM9x + - RF69 + - SX1231 + - CC1101 + - SX126x + - nRF24 + - Si443x/RFM2x + - SX128x + - LR11x0 - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -33,9 +33,13 @@ // DIO1 pin: 3 SX1278 radio = new Module(10, 2, 9, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ // create Morse client instance using the FSK module MorseClient morse(&radio); diff --git a/examples/Pager/Pager_Receive/Pager_Receive.ino b/examples/Pager/Pager_Receive/Pager_Receive.ino index 9eabeb63..edc97867 100644 --- a/examples/Pager/Pager_Receive/Pager_Receive.ino +++ b/examples/Pager/Pager_Receive/Pager_Receive.ino @@ -1,24 +1,24 @@ /* - RadioLib Pager (POCSAG) Receive Example + RadioLib Pager (POCSAG) Receive Example - This example shows how to receive FSK packets without using - SX127x packet engine. + This example shows how to receive FSK packets without using + SX127x packet engine. - This example receives POCSAG messages using SX1278's - FSK modem in direct mode. + This example receives POCSAG messages using SX1278's + FSK modem in direct mode. - Other modules that can be used to receive POCSAG: - - SX127x/RFM9x - - RF69 - - SX1231 - - CC1101 - - Si443x/RFM2x + Other modules that can be used to receive POCSAG: + - SX127x/RFM9x + - RF69 + - SX1231 + - CC1101 + - Si443x/RFM2x - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx127xrfm9x---lora-modem + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx127xrfm9x---lora-modem - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -45,9 +45,13 @@ const int pin = 5; // create Pager client instance using the FSK module PagerClient pager(&radio); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/Pager/Pager_Transmit/Pager_Transmit.ino b/examples/Pager/Pager_Transmit/Pager_Transmit.ino index 6bb331dd..3677fc78 100644 --- a/examples/Pager/Pager_Transmit/Pager_Transmit.ino +++ b/examples/Pager/Pager_Transmit/Pager_Transmit.ino @@ -1,24 +1,24 @@ /* - RadioLib Pager (POCSAG) Transmit Example + RadioLib Pager (POCSAG) Transmit Example - This example sends POCSAG messages using SX1278's - FSK modem. + This example sends POCSAG messages using SX1278's + FSK modem. - Other modules that can be used to send POCSAG: - - SX127x/RFM9x - - RF69 - - SX1231 - - CC1101 - - SX126x - - nRF24 - - Si443x/RFM2x - - SX128x + Other modules that can be used to send POCSAG: + - SX127x/RFM9x + - RF69 + - SX1231 + - CC1101 + - SX126x + - nRF24 + - Si443x/RFM2x + - SX128x - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -31,9 +31,13 @@ // DIO1 pin: 3 SX1278 radio = new Module(10, 2, 9, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ // create Pager client instance using the FSK module PagerClient pager(&radio); diff --git a/examples/PhysicalLayer/PhysicalLayer_Interface/PhysicalLayer_Interface.ino b/examples/PhysicalLayer/PhysicalLayer_Interface/PhysicalLayer_Interface.ino index b56da33f..cdea9d91 100644 --- a/examples/PhysicalLayer/PhysicalLayer_Interface/PhysicalLayer_Interface.ino +++ b/examples/PhysicalLayer/PhysicalLayer_Interface/PhysicalLayer_Interface.ino @@ -1,12 +1,12 @@ /* - RadioLib PhysicalLayer Interface Example + RadioLib PhysicalLayer Interface Example - This example shows how to use the common PhysicalLayer - to interface with different radio modules using the same - methods. + This example shows how to use the common PhysicalLayer + to interface with different radio modules using the same + methods. - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -23,6 +23,14 @@ // extra GPIO/interrupt pin: 3 (unused on some modules) RADIO_TYPE radio = new Module(10, 2, 9, 3); +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ + // get pointer to the common layer PhysicalLayer* phy = (PhysicalLayer*)&radio; diff --git a/examples/RF69/RF69_Receive_AES/RF69_Receive_AES.ino b/examples/RF69/RF69_Receive_AES/RF69_Receive_AES.ino index 857a84fd..62d1dca3 100644 --- a/examples/RF69/RF69_Receive_AES/RF69_Receive_AES.ino +++ b/examples/RF69/RF69_Receive_AES/RF69_Receive_AES.ino @@ -1,15 +1,15 @@ /* - RadioLib RF69 Receive with AES Example + RadioLib RF69 Receive with AES Example - This example receives packets using RF69 FSK radio module. - Packets are decrypted using hardware AES. - NOTE: When using address filtering, the address byte is NOT encrypted! + This example receives packets using RF69 FSK radio module. + Packets are decrypted using hardware AES. + NOTE: When using address filtering, the address byte is NOT encrypted! - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#rf69sx1231 + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#rf69sx1231 - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -21,9 +21,13 @@ // RESET pin: 3 RF69 radio = new Module(10, 2, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//RF69 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/RF69/RF69_Receive_Address/RF69_Receive_Address.ino b/examples/RF69/RF69_Receive_Address/RF69_Receive_Address.ino index 37b196e6..f8d1fe91 100644 --- a/examples/RF69/RF69_Receive_Address/RF69_Receive_Address.ino +++ b/examples/RF69/RF69_Receive_Address/RF69_Receive_Address.ino @@ -1,17 +1,17 @@ /* - RadioLib RF69 Receive with Address Example + RadioLib RF69 Receive with Address Example - This example receives packets using RF69 FSK radio module. - Packets can have 1-byte address of the destination node. - After setting node (or broadcast) address, this node will - automatically filter out any packets that do not contain - either node address or broadcast address. + This example receives packets using RF69 FSK radio module. + Packets can have 1-byte address of the destination node. + After setting node (or broadcast) address, this node will + automatically filter out any packets that do not contain + either node address or broadcast address. - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#rf69sx1231 + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#rf69sx1231 - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -23,9 +23,13 @@ // RESET pin: 3 RF69 radio = new Module(10, 2, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//RF69 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/RF69/RF69_Receive_Blocking/RF69_Receive_Blocking.ino b/examples/RF69/RF69_Receive_Blocking/RF69_Receive_Blocking.ino index 6b2c0224..66f9aab5 100644 --- a/examples/RF69/RF69_Receive_Blocking/RF69_Receive_Blocking.ino +++ b/examples/RF69/RF69_Receive_Blocking/RF69_Receive_Blocking.ino @@ -30,9 +30,13 @@ // RESET pin: 3 RF69 radio = new Module(10, 2, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//RF69 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/RF69/RF69_Receive_Interrupt/RF69_Receive_Interrupt.ino b/examples/RF69/RF69_Receive_Interrupt/RF69_Receive_Interrupt.ino index b44ac502..4678525e 100644 --- a/examples/RF69/RF69_Receive_Interrupt/RF69_Receive_Interrupt.ino +++ b/examples/RF69/RF69_Receive_Interrupt/RF69_Receive_Interrupt.ino @@ -1,15 +1,15 @@ /* - RadioLib RF69 Receive with Interrupts Example + RadioLib RF69 Receive with Interrupts Example - This example listens for FSK transmissions and tries to - receive them. Once a packet is received, an interrupt is - triggered. + This example listens for FSK transmissions and tries to + receive them. Once a packet is received, an interrupt is + triggered. - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#rf69sx1231 + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#rf69sx1231 - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -21,9 +21,13 @@ // RESET pin: 3 RF69 radio = new Module(10, 2, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//RF69 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/RF69/RF69_Settings/RF69_Settings.ino b/examples/RF69/RF69_Settings/RF69_Settings.ino index f3d6f7f5..f8729d20 100644 --- a/examples/RF69/RF69_Settings/RF69_Settings.ino +++ b/examples/RF69/RF69_Settings/RF69_Settings.ino @@ -1,21 +1,21 @@ /* - RadioLib RF69 Settings Example + RadioLib RF69 Settings Example - This example shows how to change all the properties of RF69 radio. - RadioLib currently supports the following settings: - - pins (SPI slave select, digital IO 0, digital IO 1) - - carrier frequency - - bit rate - - receiver bandwidth - - allowed frequency deviation - - output power during transmission - - sync word + This example shows how to change all the properties of RF69 radio. + RadioLib currently supports the following settings: + - pins (SPI slave select, digital IO 0, digital IO 1) + - carrier frequency + - bit rate + - receiver bandwidth + - allowed frequency deviation + - output power during transmission + - sync word - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#rf69sx1231 + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#rf69sx1231 - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -33,9 +33,13 @@ RF69 radio1 = new Module(10, 2, 3); // RESET pin: 5 RF69 radio2 = new Module(9, 4, 5); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//RF69 radio3 = RadioShield.ModuleB; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio3 = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/RF69/RF69_Transmit_AES/RF69_Transmit_AES.ino b/examples/RF69/RF69_Transmit_AES/RF69_Transmit_AES.ino index 6ef73915..4c311a9e 100644 --- a/examples/RF69/RF69_Transmit_AES/RF69_Transmit_AES.ino +++ b/examples/RF69/RF69_Transmit_AES/RF69_Transmit_AES.ino @@ -1,15 +1,15 @@ /* - RadioLib RF69 Transmit with AES Example + RadioLib RF69 Transmit with AES Example - This example transmits packets using RF69 FSK radio module. - Packets are encrypted using hardware AES. - NOTE: When using address filtering, the address byte is NOT encrypted! + This example transmits packets using RF69 FSK radio module. + Packets are encrypted using hardware AES. + NOTE: When using address filtering, the address byte is NOT encrypted! - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#rf69sx1231 + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#rf69sx1231 - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -21,9 +21,13 @@ // RESET pin: 3 RF69 radio = new Module(10, 2, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//RF69 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/RF69/RF69_Transmit_Address/RF69_Transmit_Address.ino b/examples/RF69/RF69_Transmit_Address/RF69_Transmit_Address.ino index ea3dfe33..6604c033 100644 --- a/examples/RF69/RF69_Transmit_Address/RF69_Transmit_Address.ino +++ b/examples/RF69/RF69_Transmit_Address/RF69_Transmit_Address.ino @@ -1,17 +1,17 @@ /* - RadioLib RF69 Transmit to Address Example + RadioLib RF69 Transmit to Address Example - This example transmits packets using RF69 FSK radio module. - Packets can have 1-byte address of the destination node. - After setting node (or broadcast) address, this node will - automatically filter out any packets that do not contain - either node address or broadcast address. + This example transmits packets using RF69 FSK radio module. + Packets can have 1-byte address of the destination node. + After setting node (or broadcast) address, this node will + automatically filter out any packets that do not contain + either node address or broadcast address. - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#rf69sx1231 + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#rf69sx1231 - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -23,9 +23,13 @@ // RESET pin: 3 RF69 radio = new Module(10, 2, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//RF69 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/RF69/RF69_Transmit_Blocking/RF69_Transmit_Blocking.ino b/examples/RF69/RF69_Transmit_Blocking/RF69_Transmit_Blocking.ino index 78a2bac9..fa70a7ad 100644 --- a/examples/RF69/RF69_Transmit_Blocking/RF69_Transmit_Blocking.ino +++ b/examples/RF69/RF69_Transmit_Blocking/RF69_Transmit_Blocking.ino @@ -27,9 +27,13 @@ // RESET pin: 3 RF69 radio = new Module(10, 2, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//RF69 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/RF69/RF69_Transmit_Interrupt/RF69_Transmit_Interrupt.ino b/examples/RF69/RF69_Transmit_Interrupt/RF69_Transmit_Interrupt.ino index 0eacb13d..c4de7875 100644 --- a/examples/RF69/RF69_Transmit_Interrupt/RF69_Transmit_Interrupt.ino +++ b/examples/RF69/RF69_Transmit_Interrupt/RF69_Transmit_Interrupt.ino @@ -1,18 +1,18 @@ /* - RadioLib RF69 Transmit with Interrupts Example + RadioLib RF69 Transmit with Interrupts Example - This example transmits FSK packets with one second delays - between them. Each packet contains up to 64 bytes - of data, in the form of: - - Arduino String - - null-terminated char array (C-string) - - arbitrary binary data (byte array) + This example transmits FSK packets with one second delays + between them. Each packet contains up to 64 bytes + of data, in the form of: + - Arduino String + - null-terminated char array (C-string) + - arbitrary binary data (byte array) - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#rf69sx1231 + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#rf69sx1231 - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -24,9 +24,13 @@ // RESET pin: 3 RF69 radio = new Module(10, 2, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//RF69 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ // save transmission state between loops int transmissionState = RADIOLIB_ERR_NONE; diff --git a/examples/RTTY/RTTY_Transmit/RTTY_Transmit.ino b/examples/RTTY/RTTY_Transmit/RTTY_Transmit.ino index 3c5a74bd..f839d878 100644 --- a/examples/RTTY/RTTY_Transmit/RTTY_Transmit.ino +++ b/examples/RTTY/RTTY_Transmit/RTTY_Transmit.ino @@ -1,25 +1,25 @@ /* - RadioLib RTTY Transmit Example + RadioLib RTTY Transmit Example - This example sends RTTY message using SX1278's - FSK modem. + This example sends RTTY message using SX1278's + FSK modem. - Other modules that can be used for RTTY: - - SX127x/RFM9x - - RF69 - - SX1231 - - CC1101 - - SX126x - - nRF24 - - Si443x/RFM2x - - SX128x - - LR11x0 + Other modules that can be used for RTTY: + - SX127x/RFM9x + - RF69 + - SX1231 + - CC1101 + - SX126x + - nRF24 + - Si443x/RFM2x + - SX128x + - LR11x0 - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -32,9 +32,13 @@ // DIO1 pin: 3 SX1278 radio = new Module(10, 2, 9, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ // create RTTY client instance using the FSK module RTTYClient rtty(&radio); diff --git a/examples/RTTY/RTTY_Transmit_AFSK/RTTY_Transmit_AFSK.ino b/examples/RTTY/RTTY_Transmit_AFSK/RTTY_Transmit_AFSK.ino index cbeb0fe1..2d8830cf 100644 --- a/examples/RTTY/RTTY_Transmit_AFSK/RTTY_Transmit_AFSK.ino +++ b/examples/RTTY/RTTY_Transmit_AFSK/RTTY_Transmit_AFSK.ino @@ -1,22 +1,22 @@ /* - RadioLib RTTY Transmit AFSK Example + RadioLib RTTY Transmit AFSK Example - This example sends RTTY message using SX1278's - FSK modem. The data is modulated as AFSK. + This example sends RTTY message using SX1278's + FSK modem. The data is modulated as AFSK. - Other modules that can be used for RTTY: - - SX127x/RFM9x - - RF69 - - SX1231 - - CC1101 - - Si443x/RFM2x - - SX126x/LLCC68 + Other modules that can be used for RTTY: + - SX127x/RFM9x + - RF69 + - SX1231 + - CC1101 + - Si443x/RFM2x + - SX126x/LLCC68 - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -29,9 +29,13 @@ // DIO1 pin: 3 SX1278 radio = new Module(10, 2, 9, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ // create AFSK client instance using the FSK module // this requires connection to the module direct diff --git a/examples/SSTV/SSTV_Transmit/SSTV_Transmit.ino b/examples/SSTV/SSTV_Transmit/SSTV_Transmit.ino index 46ec78a9..cf072c40 100644 --- a/examples/SSTV/SSTV_Transmit/SSTV_Transmit.ino +++ b/examples/SSTV/SSTV_Transmit/SSTV_Transmit.ino @@ -1,35 +1,35 @@ /* - RadioLib SSTV Transmit Example + RadioLib SSTV Transmit Example - The following example sends SSTV picture using - SX1278's FSK modem. + The following example sends SSTV picture using + SX1278's FSK modem. - Other modules that can be used for SSTV: - - SX127x/RFM9x - - RF69 - - SX1231 - - SX126x + Other modules that can be used for SSTV: + - SX127x/RFM9x + - RF69 + - SX1231 + - SX126x - NOTE: SSTV is an analog modulation, and - requires precise frequency control. - Some of the above modules can only - set their frequency in rough steps, - so the result can be distorted. - Using high-precision radio with TCXO - (like SX126x) is recommended. + NOTE: SSTV is an analog modulation, and + requires precise frequency control. + Some of the above modules can only + set their frequency in rough steps, + so the result can be distorted. + Using high-precision radio with TCXO + (like SX126x) is recommended. - NOTE: Some platforms (such as Arduino Uno) - might not be fast enough to correctly - send pictures via high-speed modes - like Scottie2 or Martin2. For those, - lower speed modes such as Wrasse, - Scottie1 or Martin1 are recommended. + NOTE: Some platforms (such as Arduino Uno) + might not be fast enough to correctly + send pictures via high-speed modes + like Scottie2 or Martin2. For those, + lower speed modes such as Wrasse, + Scottie1 or Martin1 are recommended. - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -42,9 +42,13 @@ // DIO1 pin: 3 SX1278 radio = new Module(10, 2, 9, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ // create SSTV client instance using the FSK module SSTVClient sstv(&radio); diff --git a/examples/SSTV/SSTV_Transmit_AFSK/SSTV_Transmit_AFSK.ino b/examples/SSTV/SSTV_Transmit_AFSK/SSTV_Transmit_AFSK.ino index 85fe8de5..667c4361 100644 --- a/examples/SSTV/SSTV_Transmit_AFSK/SSTV_Transmit_AFSK.ino +++ b/examples/SSTV/SSTV_Transmit_AFSK/SSTV_Transmit_AFSK.ino @@ -1,31 +1,31 @@ /* - RadioLib SSTV Transmit AFSK Example + RadioLib SSTV Transmit AFSK Example - The following example sends SSTV picture using - SX1278's FSK modem. The data is modulated - as AFSK. + The following example sends SSTV picture using + SX1278's FSK modem. The data is modulated + as AFSK. - Other modules that can be used for SSTV: - with AFSK modulation: - - SX127x/RFM9x - - RF69 - - SX1231 - - CC1101 - - Si443x/RFM2x - - SX126x/LLCC68 + Other modules that can be used for SSTV: + with AFSK modulation: + - SX127x/RFM9x + - RF69 + - SX1231 + - CC1101 + - Si443x/RFM2x + - SX126x/LLCC68 - NOTE: Some platforms (such as Arduino Uno) - might not be fast enough to correctly - send pictures via high-speed modes - like Scottie2 or Martin2. For those, - lower speed modes such as Wrasse, - Scottie1 or Martin1 are recommended. + NOTE: Some platforms (such as Arduino Uno) + might not be fast enough to correctly + send pictures via high-speed modes + like Scottie2 or Martin2. For those, + lower speed modes such as Wrasse, + Scottie1 or Martin1 are recommended. - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -38,9 +38,13 @@ // DIO1 pin: 3 SX1278 radio = new Module(10, 2, 9, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ // create AFSK client instance using the FSK module // this requires connection to the module direct diff --git a/examples/STM32WLx/STM32WLx_Channel_Activity_Detection/STM32WLx_Channel_Activity_Detection.ino b/examples/STM32WLx/STM32WLx_Channel_Activity_Detection/STM32WLx_Channel_Activity_Detection.ino index 0c4f9b81..20401e9e 100644 --- a/examples/STM32WLx/STM32WLx_Channel_Activity_Detection/STM32WLx_Channel_Activity_Detection.ino +++ b/examples/STM32WLx/STM32WLx_Channel_Activity_Detection/STM32WLx_Channel_Activity_Detection.ino @@ -1,16 +1,16 @@ /* - RadioLib STM32WLx Channel Activity Detection Example + RadioLib STM32WLx Channel Activity Detection Example - This example uses STM32WLx to scan the current LoRa - channel and detect ongoing LoRa transmissions. - Unlike SX127x CAD, SX126x/STM32WLx can detect any part - of LoRa transmission, not just the preamble. + This example uses STM32WLx to scan the current LoRa + channel and detect ongoing LoRa transmissions. + Unlike SX127x CAD, SX126x/STM32WLx can detect any part + of LoRa transmission, not just the preamble. - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx126x---lora-modem + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx126x---lora-modem - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library diff --git a/examples/STM32WLx/STM32WLx_Channel_Activity_Detection_Interrupt/STM32WLx_Channel_Activity_Detection_Interrupt.ino b/examples/STM32WLx/STM32WLx_Channel_Activity_Detection_Interrupt/STM32WLx_Channel_Activity_Detection_Interrupt.ino index 4475a496..1a0e390a 100644 --- a/examples/STM32WLx/STM32WLx_Channel_Activity_Detection_Interrupt/STM32WLx_Channel_Activity_Detection_Interrupt.ino +++ b/examples/STM32WLx/STM32WLx_Channel_Activity_Detection_Interrupt/STM32WLx_Channel_Activity_Detection_Interrupt.ino @@ -1,16 +1,16 @@ /* - RadioLib STM32WLx Channel Activity Detection Example + RadioLib STM32WLx Channel Activity Detection Example - This example uses STM32WLx to scan the current LoRa - channel and detect ongoing LoRa transmissions. - Unlike SX127x CAD, SX126x/STM32WLx can detect any part - of LoRa transmission, not just the preamble. + This example uses STM32WLx to scan the current LoRa + channel and detect ongoing LoRa transmissions. + Unlike SX127x CAD, SX126x/STM32WLx can detect any part + of LoRa transmission, not just the preamble. - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx126x---lora-modem + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx126x---lora-modem - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library diff --git a/examples/STM32WLx/STM32WLx_Receive_Interrupt/STM32WLx_Receive_Interrupt.ino b/examples/STM32WLx/STM32WLx_Receive_Interrupt/STM32WLx_Receive_Interrupt.ino index 1fb31ddb..fe203f2a 100644 --- a/examples/STM32WLx/STM32WLx_Receive_Interrupt/STM32WLx_Receive_Interrupt.ino +++ b/examples/STM32WLx/STM32WLx_Receive_Interrupt/STM32WLx_Receive_Interrupt.ino @@ -1,26 +1,26 @@ /* - RadioLib STM32WLx Receive with Interrupts Example + RadioLib STM32WLx Receive with Interrupts Example - This example listens for LoRa transmissions and tries to - receive them. Once a packet is received, an interrupt is - triggered. To successfully receive data, the following - settings have to be the same on both transmitter - and receiver: - - carrier frequency - - bandwidth - - spreading factor - - coding rate - - sync word - - This example assumes Nucleo WL55JC1 is used. For other Nucleo boards - or standalone STM32WL, some configuration such as TCXO voltage and - RF switch control may have to be adjusted. + This example listens for LoRa transmissions and tries to + receive them. Once a packet is received, an interrupt is + triggered. To successfully receive data, the following + settings have to be the same on both transmitter + and receiver: + - carrier frequency + - bandwidth + - spreading factor + - coding rate + - sync word + + This example assumes Nucleo WL55JC1 is used. For other Nucleo boards + or standalone STM32WL, some configuration such as TCXO voltage and + RF switch control may have to be adjusted. - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx126x---lora-modem + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx126x---lora-modem - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library diff --git a/examples/SX123x/SX123x_Receive_Blocking/SX123x_Receive_Blocking.ino b/examples/SX123x/SX123x_Receive_Blocking/SX123x_Receive_Blocking.ino index 66978b6b..896e1ba7 100644 --- a/examples/SX123x/SX123x_Receive_Blocking/SX123x_Receive_Blocking.ino +++ b/examples/SX123x/SX123x_Receive_Blocking/SX123x_Receive_Blocking.ino @@ -29,9 +29,13 @@ // RESET pin: 3 SX1231 radio = new Module(10, 2, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1231 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/SX123x/SX123x_Transmit_Blocking/SX123x_Transmit_Blocking.ino b/examples/SX123x/SX123x_Transmit_Blocking/SX123x_Transmit_Blocking.ino index 50bbe1bf..fd869245 100644 --- a/examples/SX123x/SX123x_Transmit_Blocking/SX123x_Transmit_Blocking.ino +++ b/examples/SX123x/SX123x_Transmit_Blocking/SX123x_Transmit_Blocking.ino @@ -28,9 +28,13 @@ // RESET pin: 3 SX1231 radio = new Module(10, 2, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1231 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/SX126x/SX126x_Channel_Activity_Detection_Blocking/SX126x_Channel_Activity_Detection_Blocking.ino b/examples/SX126x/SX126x_Channel_Activity_Detection_Blocking/SX126x_Channel_Activity_Detection_Blocking.ino index 17d6b9f0..8c668e1a 100644 --- a/examples/SX126x/SX126x_Channel_Activity_Detection_Blocking/SX126x_Channel_Activity_Detection_Blocking.ino +++ b/examples/SX126x/SX126x_Channel_Activity_Detection_Blocking/SX126x_Channel_Activity_Detection_Blocking.ino @@ -30,12 +30,13 @@ // BUSY pin: 9 SX1262 radio = new Module(10, 2, 3, 9); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1262 radio = RadioShield.ModuleA; - -// or using CubeCell -//SX1262 radio = new Module(RADIOLIB_BUILTIN_MODULE); +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/SX126x/SX126x_Channel_Activity_Detection_Interrupt/SX126x_Channel_Activity_Detection_Interrupt.ino b/examples/SX126x/SX126x_Channel_Activity_Detection_Interrupt/SX126x_Channel_Activity_Detection_Interrupt.ino index 0d0f45cd..c47b4b28 100644 --- a/examples/SX126x/SX126x_Channel_Activity_Detection_Interrupt/SX126x_Channel_Activity_Detection_Interrupt.ino +++ b/examples/SX126x/SX126x_Channel_Activity_Detection_Interrupt/SX126x_Channel_Activity_Detection_Interrupt.ino @@ -1,18 +1,18 @@ /* - RadioLib SX126x Channel Activity Detection Example + RadioLib SX126x Channel Activity Detection Example - This example uses SX1262 to scan the current LoRa - channel and detect ongoing LoRa transmissions. - Unlike SX127x CAD, SX126x can detect any part - of LoRa transmission, not just the preamble. + This example uses SX1262 to scan the current LoRa + channel and detect ongoing LoRa transmissions. + Unlike SX127x CAD, SX126x can detect any part + of LoRa transmission, not just the preamble. - Other modules from SX126x family can also be used. + Other modules from SX126x family can also be used. - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx126x---lora-modem + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx126x---lora-modem - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -25,12 +25,13 @@ // BUSY pin: 9 SX1262 radio = new Module(10, 2, 3, 9); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1262 radio = RadioShield.ModuleA; - -// or using CubeCell -//SX1262 radio = new Module(RADIOLIB_BUILTIN_MODULE); +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/SX126x/SX126x_Channel_Activity_Detection_Receive/SX126x_Channel_Activity_Detection_Receive.ino b/examples/SX126x/SX126x_Channel_Activity_Detection_Receive/SX126x_Channel_Activity_Detection_Receive.ino index 6b68227e..ec89de08 100644 --- a/examples/SX126x/SX126x_Channel_Activity_Detection_Receive/SX126x_Channel_Activity_Detection_Receive.ino +++ b/examples/SX126x/SX126x_Channel_Activity_Detection_Receive/SX126x_Channel_Activity_Detection_Receive.ino @@ -27,12 +27,13 @@ // BUSY pin: 9 SX1262 radio = new Module(10, 2, 3, 9); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1262 radio = RadioShield.ModuleA; - -// or using CubeCell -//SX1262 radio = new Module(RADIOLIB_BUILTIN_MODULE); +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/SX126x/SX126x_FSK_Modem/SX126x_FSK_Modem.ino b/examples/SX126x/SX126x_FSK_Modem/SX126x_FSK_Modem.ino index 93a18b65..9bffbeee 100644 --- a/examples/SX126x/SX126x_FSK_Modem/SX126x_FSK_Modem.ino +++ b/examples/SX126x/SX126x_FSK_Modem/SX126x_FSK_Modem.ino @@ -1,19 +1,19 @@ /* - RadioLib SX126x FSK Modem Example + RadioLib SX126x FSK Modem Example - This example shows how to use FSK modem in SX126x chips. + This example shows how to use FSK modem in SX126x chips. - NOTE: The sketch below is just a guide on how to use - FSK modem, so this code should not be run directly! - Instead, modify the other examples to use FSK - modem and use the appropriate configuration - methods. + NOTE: The sketch below is just a guide on how to use + FSK modem, so this code should not be run directly! + Instead, modify the other examples to use FSK + modem and use the appropriate configuration + methods. - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx126x---fsk-modem + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx126x---fsk-modem - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -26,12 +26,13 @@ // BUSY pin: 9 SX1262 radio = new Module(10, 2, 3, 9); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1262 radio = RadioShield.ModuleA; - -// or using CubeCell -//SX1262 radio = new Module(RADIOLIB_BUILTIN_MODULE); +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/SX126x/SX126x_LR_FHSS_Modem/SX126x_LR_FHSS_Modem.ino b/examples/SX126x/SX126x_LR_FHSS_Modem/SX126x_LR_FHSS_Modem.ino index d0f45f8d..9b279447 100644 --- a/examples/SX126x/SX126x_LR_FHSS_Modem/SX126x_LR_FHSS_Modem.ino +++ b/examples/SX126x/SX126x_LR_FHSS_Modem/SX126x_LR_FHSS_Modem.ino @@ -27,12 +27,13 @@ // BUSY pin: 9 SX1262 radio = new Module(10, 2, 3, 9); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1262 radio = RadioShield.ModuleA; - -// or using CubeCell -//SX1262 radio = new Module(RADIOLIB_BUILTIN_MODULE); +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/SX126x/SX126x_PingPong/SX126x_PingPong.ino b/examples/SX126x/SX126x_PingPong/SX126x_PingPong.ino index 0ec708c8..ff409f34 100644 --- a/examples/SX126x/SX126x_PingPong/SX126x_PingPong.ino +++ b/examples/SX126x/SX126x_PingPong/SX126x_PingPong.ino @@ -1,11 +1,14 @@ /* - RadioLib SX126x Ping-Pong Example + RadioLib SX126x Ping-Pong Example - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx126x---lora-modem + This example is intended to run on two SX126x radios, + and send packets between the two. - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx126x---lora-modem + + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -22,12 +25,13 @@ // BUSY pin: 9 SX1262 radio = new Module(10, 2, 3, 9); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1262 radio = RadioShield.ModuleA; - -// or using CubeCell -//SX1262 radio = new Module(RADIOLIB_BUILTIN_MODULE); +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ // save transmission states between loops int transmissionState = RADIOLIB_ERR_NONE; diff --git a/examples/SX126x/SX126x_Receive_Blocking/SX126x_Receive_Blocking.ino b/examples/SX126x/SX126x_Receive_Blocking/SX126x_Receive_Blocking.ino index 0dee9533..a1641ed2 100644 --- a/examples/SX126x/SX126x_Receive_Blocking/SX126x_Receive_Blocking.ino +++ b/examples/SX126x/SX126x_Receive_Blocking/SX126x_Receive_Blocking.ino @@ -1,28 +1,28 @@ /* - RadioLib SX126x Blocking Receive Example + RadioLib SX126x Blocking Receive Example - This example listens for LoRa transmissions using SX126x Lora modules. - To successfully receive data, the following settings have to be the same - on both transmitter and receiver: - - carrier frequency - - bandwidth - - spreading factor - - coding rate - - sync word - - preamble length + This example listens for LoRa transmissions using SX126x Lora modules. + To successfully receive data, the following settings have to be the same + on both transmitter and receiver: + - carrier frequency + - bandwidth + - spreading factor + - coding rate + - sync word + - preamble length - Other modules from SX126x family can also be used. + Other modules from SX126x family can also be used. - 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. +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#sx126x---lora-modem + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx126x---lora-modem - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -35,12 +35,13 @@ // BUSY pin: 9 SX1262 radio = new Module(10, 2, 3, 9); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1262 radio = RadioShield.ModuleA; - -// or using CubeCell -//SX1262 radio = new Module(RADIOLIB_BUILTIN_MODULE); +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/SX126x/SX126x_Receive_Interrupt/SX126x_Receive_Interrupt.ino b/examples/SX126x/SX126x_Receive_Interrupt/SX126x_Receive_Interrupt.ino index 017c78cd..42e27f28 100644 --- a/examples/SX126x/SX126x_Receive_Interrupt/SX126x_Receive_Interrupt.ino +++ b/examples/SX126x/SX126x_Receive_Interrupt/SX126x_Receive_Interrupt.ino @@ -1,24 +1,24 @@ /* - RadioLib SX126x Receive with Interrupts Example + RadioLib SX126x Receive with Interrupts Example - This example listens for LoRa transmissions and tries to - receive them. Once a packet is received, an interrupt is - triggered. To successfully receive data, the following - settings have to be the same on both transmitter - and receiver: - - carrier frequency - - bandwidth - - spreading factor - - coding rate - - sync word + This example listens for LoRa transmissions and tries to + receive them. Once a packet is received, an interrupt is + triggered. To successfully receive data, the following + settings have to be the same on both transmitter + and receiver: + - carrier frequency + - bandwidth + - spreading factor + - coding rate + - sync word - Other modules from SX126x family can also be used. + Other modules from SX126x family can also be used. - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx126x---lora-modem + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx126x---lora-modem - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -31,12 +31,13 @@ // BUSY pin: 9 SX1262 radio = new Module(10, 2, 3, 9); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1262 radio = RadioShield.ModuleA; - -// or using CubeCell -//SX1262 radio = new Module(RADIOLIB_BUILTIN_MODULE); +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/SX126x/SX126x_Settings/SX126x_Settings.ino b/examples/SX126x/SX126x_Settings/SX126x_Settings.ino index 28740398..71a4d8fb 100644 --- a/examples/SX126x/SX126x_Settings/SX126x_Settings.ino +++ b/examples/SX126x/SX126x_Settings/SX126x_Settings.ino @@ -1,27 +1,27 @@ /* - RadioLib SX126x Settings Example + RadioLib SX126x Settings Example - This example shows how to change all the properties of LoRa transmission. - RadioLib currently supports the following settings: - - pins (SPI slave select, DIO1, DIO2, BUSY pin) - - carrier frequency - - bandwidth - - spreading factor - - coding rate - - sync word - - output power during transmission - - CRC - - preamble length - - TCXO voltage - - DIO2 RF switch control + This example shows how to change all the properties of LoRa transmission. + RadioLib currently supports the following settings: + - pins (SPI slave select, DIO1, DIO2, BUSY pin) + - carrier frequency + - bandwidth + - spreading factor + - coding rate + - sync word + - output power during transmission + - CRC + - preamble length + - TCXO voltage + - DIO2 RF switch control - Other modules from SX126x family can also be used. + Other modules from SX126x family can also be used. - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx126x---lora-modem + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx126x---lora-modem - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -41,12 +41,13 @@ SX1262 radio1 = new Module(10, 2, 3, 9); // BUSY pin: 6 SX1268 radio2 = new Module(8, 4, 5, 6); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1261 radio3 = RadioShield.ModuleB; - -// or using CubeCell -//SX1262 radio = new Module(RADIOLIB_BUILTIN_MODULE); +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio3 = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/SX126x/SX126x_Spectrum_Scan/SX126x_Spectrum_Scan.ino b/examples/SX126x/SX126x_Spectrum_Scan/SX126x_Spectrum_Scan.ino index 987f4655..bf28f36a 100644 --- a/examples/SX126x/SX126x_Spectrum_Scan/SX126x_Spectrum_Scan.ino +++ b/examples/SX126x/SX126x_Spectrum_Scan/SX126x_Spectrum_Scan.ino @@ -1,24 +1,24 @@ /* - RadioLib SX126x Spectrum Scan Example + RadioLib SX126x Spectrum Scan Example - This example shows how to perform a spectrum power scan using SX126x. - The output is in the form of scan lines, each line has 33 power bins. - First power bin corresponds to -11 dBm, the second to -15 dBm and so on. - Higher number of samples in a bin corresponds to more power received - at that level. + This example shows how to perform a spectrum power scan using SX126x. + The output is in the form of scan lines, each line has 33 power bins. + First power bin corresponds to -11 dBm, the second to -15 dBm and so on. + Higher number of samples in a bin corresponds to more power received + at that level. - To show the results in a plot, run the Python script - RadioLib/extras/SX126x_Spectrum_Scan/SpectrumScan.py + To show the results in a plot, run the Python script + RadioLib/extras/SX126x_Spectrum_Scan/SpectrumScan.py - WARNING: This functionality is experimental and requires a binary patch - to be uploaded to the SX126x device. There may be some undocumented - side effects! + WARNING: This functionality is experimental and requires a binary patch + to be uploaded to the SX126x device. There may be some undocumented + side effects! - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx126x---lora-modem + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx126x---lora-modem - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -34,6 +34,14 @@ // BUSY pin: 9 SX1262 radio = new Module(10, 2, 3, 9); +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ + void setup() { Serial.begin(115200); diff --git a/examples/SX126x/SX126x_Spectrum_Scan_Frequency/SX126x_Spectrum_Scan_Frequency.ino b/examples/SX126x/SX126x_Spectrum_Scan_Frequency/SX126x_Spectrum_Scan_Frequency.ino index f5de4607..71d3445a 100644 --- a/examples/SX126x/SX126x_Spectrum_Scan_Frequency/SX126x_Spectrum_Scan_Frequency.ino +++ b/examples/SX126x/SX126x_Spectrum_Scan_Frequency/SX126x_Spectrum_Scan_Frequency.ino @@ -1,24 +1,24 @@ /* - RadioLib SX126x Spectrum Scan Example + RadioLib SX126x Spectrum Scan Example - This example shows how to perform a spectrum power scan using SX126x. - The output is in the form of scan lines, each line has 33 power bins. - First power bin corresponds to -11 dBm, the second to -15 dBm and so on. - Higher number of samples in a bin corresponds to more power received - at that level. The example performs frequency sweep over a given range. + This example shows how to perform a spectrum power scan using SX126x. + The output is in the form of scan lines, each line has 33 power bins. + First power bin corresponds to -11 dBm, the second to -15 dBm and so on. + Higher number of samples in a bin corresponds to more power received + at that level. The example performs frequency sweep over a given range. - To show the results in a plot, run the Python script - RadioLib/extras/SX126x_Spectrum_Scan/SpectrumScan.py + To show the results in a plot, run the Python script + RadioLib/extras/SX126x_Spectrum_Scan/SpectrumScan.py - WARNING: This functionality is experimental and requires a binary patch - to be uploaded to the SX126x device. There may be some undocumented - side effects! + WARNING: This functionality is experimental and requires a binary patch + to be uploaded to the SX126x device. There may be some undocumented + side effects! - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx126x---lora-modem + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx126x---lora-modem - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -34,6 +34,14 @@ // BUSY pin: 9 SX1262 radio = new Module(10, 2, 3, 9); +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ + // frequency range in MHz to scan const float freqStart = 431; const float freqEnd = 435; diff --git a/examples/SX126x/SX126x_Transmit_Blocking/SX126x_Transmit_Blocking.ino b/examples/SX126x/SX126x_Transmit_Blocking/SX126x_Transmit_Blocking.ino index e090ef8e..c222e2ff 100644 --- a/examples/SX126x/SX126x_Transmit_Blocking/SX126x_Transmit_Blocking.ino +++ b/examples/SX126x/SX126x_Transmit_Blocking/SX126x_Transmit_Blocking.ino @@ -30,12 +30,13 @@ // BUSY pin: 9 SX1262 radio = new Module(10, 2, 3, 9); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1262 radio = RadioShield.ModuleA; - -// or using CubeCell -//SX1262 radio = new Module(RADIOLIB_BUILTIN_MODULE); +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/SX126x/SX126x_Transmit_Interrupt/SX126x_Transmit_Interrupt.ino b/examples/SX126x/SX126x_Transmit_Interrupt/SX126x_Transmit_Interrupt.ino index 5f0b9ea1..1acf3ee1 100644 --- a/examples/SX126x/SX126x_Transmit_Interrupt/SX126x_Transmit_Interrupt.ino +++ b/examples/SX126x/SX126x_Transmit_Interrupt/SX126x_Transmit_Interrupt.ino @@ -27,12 +27,13 @@ // BUSY pin: 9 SX1262 radio = new Module(10, 2, 3, 9); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1262 radio = RadioShield.ModuleA; - -// or using CubeCell -//SX1262 radio = new Module(RADIOLIB_BUILTIN_MODULE); +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ // save transmission state between loops int transmissionState = RADIOLIB_ERR_NONE; diff --git a/examples/SX127x/SX127x_Channel_Activity_Detection_Blocking/SX127x_Channel_Activity_Detection_Blocking.ino b/examples/SX127x/SX127x_Channel_Activity_Detection_Blocking/SX127x_Channel_Activity_Detection_Blocking.ino index ebd3ed32..c88d934e 100644 --- a/examples/SX127x/SX127x_Channel_Activity_Detection_Blocking/SX127x_Channel_Activity_Detection_Blocking.ino +++ b/examples/SX127x/SX127x_Channel_Activity_Detection_Blocking/SX127x_Channel_Activity_Detection_Blocking.ino @@ -31,9 +31,13 @@ // DIO1 pin: 3 SX1278 radio = new Module(10, 2, 9, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/SX127x/SX127x_Channel_Activity_Detection_Interrupt/SX127x_Channel_Activity_Detection_Interrupt.ino b/examples/SX127x/SX127x_Channel_Activity_Detection_Interrupt/SX127x_Channel_Activity_Detection_Interrupt.ino index edb01aa4..95070e0e 100644 --- a/examples/SX127x/SX127x_Channel_Activity_Detection_Interrupt/SX127x_Channel_Activity_Detection_Interrupt.ino +++ b/examples/SX127x/SX127x_Channel_Activity_Detection_Interrupt/SX127x_Channel_Activity_Detection_Interrupt.ino @@ -1,19 +1,19 @@ /* - RadioLib SX127x Channel Activity Detection with Interrupts Example + RadioLib SX127x Channel Activity Detection with Interrupts Example - This example scans the current LoRa channel and detects - valid LoRa preambles. Preamble is the first part of - LoRa transmission, so this can be used to check - if the LoRa channel is free, or if you should start - receiving a message. + This example scans the current LoRa channel and detects + valid LoRa preambles. Preamble is the first part of + LoRa transmission, so this can be used to check + if the LoRa channel is free, or if you should start + receiving a message. - Other modules from SX127x/RFM9x family can also be used. + Other modules from SX127x/RFM9x family can also be used. - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx127xrfm9x---lora-modem + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx127xrfm9x---lora-modem - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -26,9 +26,13 @@ // DIO1 pin: 3 SX1278 radio = new Module(10, 2, 9, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { // Serial port speed must be high enough for this example diff --git a/examples/SX127x/SX127x_Channel_Activity_Detection_Receive/SX127x_Channel_Activity_Detection_Receive.ino b/examples/SX127x/SX127x_Channel_Activity_Detection_Receive/SX127x_Channel_Activity_Detection_Receive.ino index f78d747a..9b03d2e2 100644 --- a/examples/SX127x/SX127x_Channel_Activity_Detection_Receive/SX127x_Channel_Activity_Detection_Receive.ino +++ b/examples/SX127x/SX127x_Channel_Activity_Detection_Receive/SX127x_Channel_Activity_Detection_Receive.ino @@ -1,24 +1,24 @@ /* - RadioLib SX127x Receive after Channel Activity Detection Example + RadioLib SX127x Receive after Channel Activity Detection Example - This example scans the current LoRa channel and detects - valid LoRa preambles. Preamble is the first part of - LoRa transmission, so this can be used to check - if the LoRa channel is free, or if you should start - receiving a message. If a preamble is detected, - the module will switch to receive mode and receive the packet. - - For most use-cases, it should be enough to just use the - interrupt-driven reception described in the example - "SX127x_Receive_Interrupt". + This example scans the current LoRa channel and detects + valid LoRa preambles. Preamble is the first part of + LoRa transmission, so this can be used to check + if the LoRa channel is free, or if you should start + receiving a message. If a preamble is detected, + the module will switch to receive mode and receive the packet. + + For most use-cases, it should be enough to just use the + interrupt-driven reception described in the example + "SX127x_Receive_Interrupt". - Other modules from SX127x/RFM9x family can also be used. + Other modules from SX127x/RFM9x family can also be used. - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx127xrfm9x---lora-modem + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx127xrfm9x---lora-modem - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -31,9 +31,13 @@ // DIO1 pin: 3 SX1278 radio = new Module(10, 2, 9, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { // Serial port speed must be high enough for this example diff --git a/examples/SX127x/SX127x_FSK_Modem/SX127x_FSK_Modem.ino b/examples/SX127x/SX127x_FSK_Modem/SX127x_FSK_Modem.ino index 49617884..0dae88c8 100644 --- a/examples/SX127x/SX127x_FSK_Modem/SX127x_FSK_Modem.ino +++ b/examples/SX127x/SX127x_FSK_Modem/SX127x_FSK_Modem.ino @@ -1,19 +1,19 @@ /* - RadioLib SX127x FSK Modem Example + RadioLib SX127x FSK Modem Example - This example shows how to use FSK modem in SX127x chips. + This example shows how to use FSK modem in SX127x chips. - NOTE: The sketch below is just a guide on how to use - FSK modem, so this code should not be run directly! - Instead, modify the other examples to use FSK - modem and use the appropriate configuration - methods. + NOTE: The sketch below is just a guide on how to use + FSK modem, so this code should not be run directly! + Instead, modify the other examples to use FSK + modem and use the appropriate configuration + methods. - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx127xrfm9x---fsk-modem + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx127xrfm9x---fsk-modem - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -26,9 +26,13 @@ // DIO1 pin: 3 SX1278 radio = new Module(10, 2, 9, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/SX127x/SX127x_PingPong/SX127x_PingPong.ino b/examples/SX127x/SX127x_PingPong/SX127x_PingPong.ino index 0e191f20..eb2cc04c 100644 --- a/examples/SX127x/SX127x_PingPong/SX127x_PingPong.ino +++ b/examples/SX127x/SX127x_PingPong/SX127x_PingPong.ino @@ -1,11 +1,14 @@ /* - RadioLib SX127x Ping-Pong Example + RadioLib SX127x Ping-Pong Example - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx127xrfm9x---lora-modem + This example is intended to run on two SX126x radios, + and send packets between the two. - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx127xrfm9x---lora-modem + + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -22,9 +25,13 @@ // DIO1 pin: 3 SX1278 radio = new Module(10, 2, 9, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ // save transmission states between loops int transmissionState = RADIOLIB_ERR_NONE; diff --git a/examples/SX127x/SX127x_Receive_Blocking/SX127x_Receive_Blocking.ino b/examples/SX127x/SX127x_Receive_Blocking/SX127x_Receive_Blocking.ino index b2a1e302..d52eef53 100644 --- a/examples/SX127x/SX127x_Receive_Blocking/SX127x_Receive_Blocking.ino +++ b/examples/SX127x/SX127x_Receive_Blocking/SX127x_Receive_Blocking.ino @@ -35,9 +35,13 @@ // DIO1 pin: 3 SX1278 radio = new Module(10, 2, 9, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/SX127x/SX127x_Receive_Direct/SX127x_Receive_Direct.ino b/examples/SX127x/SX127x_Receive_Direct/SX127x_Receive_Direct.ino index d622a2a2..f41493b2 100644 --- a/examples/SX127x/SX127x_Receive_Direct/SX127x_Receive_Direct.ino +++ b/examples/SX127x/SX127x_Receive_Direct/SX127x_Receive_Direct.ino @@ -1,14 +1,14 @@ /* - RadioLib SX127x Direct Receive Example + RadioLib SX127x Direct Receive Example - This example shows how to receive FSK packets without using - SX127x packet engine. + This example shows how to receive FSK packets without using + SX127x packet engine. - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx127xrfm9x---lora-modem + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx127xrfm9x---lora-modem - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -24,9 +24,13 @@ SX1278 radio = new Module(10, 2, 9, 3); // DIO2 pin: 5 const int pin = 5; -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/SX127x/SX127x_Receive_FHSS/SX127x_Receive_FHSS.ino b/examples/SX127x/SX127x_Receive_FHSS/SX127x_Receive_FHSS.ino index ede24586..c17cd343 100644 --- a/examples/SX127x/SX127x_Receive_FHSS/SX127x_Receive_FHSS.ino +++ b/examples/SX127x/SX127x_Receive_FHSS/SX127x_Receive_FHSS.ino @@ -1,24 +1,24 @@ /* - RadioLib SX127x Transmit with Frequency Hopping Example + RadioLib SX127x Transmit with Frequency Hopping Example - This example transmits packets using SX1278 LoRa radio module. - Each packet contains up to 256 bytes of data, in the form of: - - Arduino String - - null-terminated char array (C-string) - - arbitrary binary data (byte array) + This example transmits packets using SX1278 LoRa radio module. + Each packet contains up to 256 bytes of data, in the form of: + - Arduino String + - null-terminated char array (C-string) + - arbitrary binary data (byte array) - Other modules from SX127x/RFM9x family can also be used. + Other modules from SX127x/RFM9x family can also be used. - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx127xrfm9x---lora-modem + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx127xrfm9x---lora-modem - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ - SX127x supports FHSS or Frequency Hopping Spread Spectrum. - Once a hopping period is set and a transmission is started, the radio - will begin triggering interrupts every hop period where the radio frequency - is changed to the next channel. + SX127x supports FHSS or Frequency Hopping Spread Spectrum. + Once a hopping period is set and a transmission is started, the radio + will begin triggering interrupts every hop period where the radio frequency + is changed to the next channel. */ #include @@ -30,9 +30,13 @@ // DIO1 pin: 3 SX1278 radio = new Module(10, 2, 9, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ // flag to indicate that a packet was received volatile bool receivedFlag = false; diff --git a/examples/SX127x/SX127x_Receive_Interrupt/SX127x_Receive_Interrupt.ino b/examples/SX127x/SX127x_Receive_Interrupt/SX127x_Receive_Interrupt.ino index 5d2adbff..451e4192 100644 --- a/examples/SX127x/SX127x_Receive_Interrupt/SX127x_Receive_Interrupt.ino +++ b/examples/SX127x/SX127x_Receive_Interrupt/SX127x_Receive_Interrupt.ino @@ -1,24 +1,24 @@ /* - RadioLib SX127x Receive with Interrupts Example + RadioLib SX127x Receive with Interrupts Example - This example listens for LoRa transmissions and tries to - receive them. Once a packet is received, an interrupt is - triggered. To successfully receive data, the following - settings have to be the same on both transmitter - and receiver: - - carrier frequency - - bandwidth - - spreading factor - - coding rate - - sync word + This example listens for LoRa transmissions and tries to + receive them. Once a packet is received, an interrupt is + triggered. To successfully receive data, the following + settings have to be the same on both transmitter + and receiver: + - carrier frequency + - bandwidth + - spreading factor + - coding rate + - sync word - Other modules from SX127x/RFM9x family can also be used. + Other modules from SX127x/RFM9x family can also be used. - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx127xrfm9x---lora-modem + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx127xrfm9x---lora-modem - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -31,9 +31,13 @@ // DIO1 pin: 3 SX1278 radio = new Module(10, 2, 9, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/SX127x/SX127x_Settings/SX127x_Settings.ino b/examples/SX127x/SX127x_Settings/SX127x_Settings.ino index 6fbc631b..aee08ff1 100644 --- a/examples/SX127x/SX127x_Settings/SX127x_Settings.ino +++ b/examples/SX127x/SX127x_Settings/SX127x_Settings.ino @@ -1,23 +1,23 @@ /* - RadioLib SX127x Settings Example + RadioLib SX127x Settings Example - This example shows how to change all the properties of LoRa transmission. - RadioLib currently supports the following settings: - - pins (SPI slave select, digital IO 0, digital IO 1) - - carrier frequency - - bandwidth - - spreading factor - - coding rate - - sync word - - output power during transmission + This example shows how to change all the properties of LoRa transmission. + RadioLib currently supports the following settings: + - pins (SPI slave select, digital IO 0, digital IO 1) + - carrier frequency + - bandwidth + - spreading factor + - coding rate + - sync word + - output power during transmission - Other modules from SX127x/RFM9x family can also be used. + Other modules from SX127x/RFM9x family can also be used. - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx127xrfm9x---lora-modem + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx127xrfm9x---lora-modem - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -37,9 +37,13 @@ SX1278 radio1 = new Module(10, 2, 9, 3); // DIO1 pin: 6 SX1272 radio2 = new Module(9, 4, 5, 6); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1276 radio3 = RadioShield.ModuleB; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio3 = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/SX127x/SX127x_Transmit_Blocking/SX127x_Transmit_Blocking.ino b/examples/SX127x/SX127x_Transmit_Blocking/SX127x_Transmit_Blocking.ino index e5b258e3..62264ef8 100644 --- a/examples/SX127x/SX127x_Transmit_Blocking/SX127x_Transmit_Blocking.ino +++ b/examples/SX127x/SX127x_Transmit_Blocking/SX127x_Transmit_Blocking.ino @@ -30,9 +30,13 @@ // DIO1 pin: 3 SX1278 radio = new Module(10, 2, 9, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/SX127x/SX127x_Transmit_FHSS/SX127x_Transmit_FHSS.ino b/examples/SX127x/SX127x_Transmit_FHSS/SX127x_Transmit_FHSS.ino index d7210af6..dac0ce16 100644 --- a/examples/SX127x/SX127x_Transmit_FHSS/SX127x_Transmit_FHSS.ino +++ b/examples/SX127x/SX127x_Transmit_FHSS/SX127x_Transmit_FHSS.ino @@ -1,24 +1,24 @@ /* - RadioLib SX127x Transmit with Frequency Hopping Example + RadioLib SX127x Transmit with Frequency Hopping Example - This example transmits packets using SX1278 LoRa radio module. - Each packet contains up to 255 bytes of data, in the form of: - - Arduino String - - null-terminated char array (C-string) - - arbitrary binary data (byte array) + This example transmits packets using SX1278 LoRa radio module. + Each packet contains up to 255 bytes of data, in the form of: + - Arduino String + - null-terminated char array (C-string) + - arbitrary binary data (byte array) - Other modules from SX127x/RFM9x family can also be used. + Other modules from SX127x/RFM9x family can also be used. - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx127xrfm9x---lora-modem + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx127xrfm9x---lora-modem - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ - SX127x supports FHSS or Frequency Hopping Spread Spectrum. - Once a hopping period is set and a transmission is started, the radio - will begin triggering interrupts every hop period where the radio frequency - is changed to the next channel. + SX127x supports FHSS or Frequency Hopping Spread Spectrum. + Once a hopping period is set and a transmission is started, the radio + will begin triggering interrupts every hop period where the radio frequency + is changed to the next channel. */ #include @@ -30,9 +30,13 @@ // DIO1 pin: 3 SX1278 radio = new Module(10, 2, 9, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ // flag to indicate that a packet was received volatile bool transmittedFlag = false; diff --git a/examples/SX127x/SX127x_Transmit_Interrupt/SX127x_Transmit_Interrupt.ino b/examples/SX127x/SX127x_Transmit_Interrupt/SX127x_Transmit_Interrupt.ino index 7b78080e..22785d76 100644 --- a/examples/SX127x/SX127x_Transmit_Interrupt/SX127x_Transmit_Interrupt.ino +++ b/examples/SX127x/SX127x_Transmit_Interrupt/SX127x_Transmit_Interrupt.ino @@ -27,9 +27,13 @@ // DIO1 pin: 3 SX1278 radio = new Module(10, 2, 9, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ // save transmission state between loops int transmissionState = RADIOLIB_ERR_NONE; diff --git a/examples/SX128x/SX128x_BLE_Modem/SX128x_BLE_Modem.ino b/examples/SX128x/SX128x_BLE_Modem/SX128x_BLE_Modem.ino index be6b8266..04767da0 100644 --- a/examples/SX128x/SX128x_BLE_Modem/SX128x_BLE_Modem.ino +++ b/examples/SX128x/SX128x_BLE_Modem/SX128x_BLE_Modem.ino @@ -1,21 +1,21 @@ /* - RadioLib SX128x BLE Modem Example + RadioLib SX128x BLE Modem Example - This example shows how to use BLE modem in SX128x chips. - RadioLib does not provide BLE protocol support (yet), - only compatibility with the physical layer. + This example shows how to use BLE modem in SX128x chips. + RadioLib does not provide BLE protocol support (yet), + only compatibility with the physical layer. - NOTE: The sketch below is just a guide on how to use - BLE modem, so this code should not be run directly! - Instead, modify the other examples to use BLE - modem and use the appropriate configuration - methods. + NOTE: The sketch below is just a guide on how to use + BLE modem, so this code should not be run directly! + Instead, modify the other examples to use BLE + modem and use the appropriate configuration + methods. - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx128x---ble-modem + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx128x---ble-modem - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -28,9 +28,13 @@ // BUSY pin: 9 SX1280 radio = new Module(10, 2, 3, 9); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1280 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/SX128x/SX128x_Channel_Activity_Detection_Blocking/SX128x_Channel_Activity_Detection_Blocking.ino b/examples/SX128x/SX128x_Channel_Activity_Detection_Blocking/SX128x_Channel_Activity_Detection_Blocking.ino index 91ab462e..e12a08b5 100644 --- a/examples/SX128x/SX128x_Channel_Activity_Detection_Blocking/SX128x_Channel_Activity_Detection_Blocking.ino +++ b/examples/SX128x/SX128x_Channel_Activity_Detection_Blocking/SX128x_Channel_Activity_Detection_Blocking.ino @@ -28,9 +28,13 @@ // BUSY pin: 9 SX1280 radio = new Module(10, 2, 3, 9); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1280 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/SX128x/SX128x_Channel_Activity_Detection_Interrupt/SX128x_Channel_Activity_Detection_Interrupt.ino b/examples/SX128x/SX128x_Channel_Activity_Detection_Interrupt/SX128x_Channel_Activity_Detection_Interrupt.ino index da0d8f73..8a57e181 100644 --- a/examples/SX128x/SX128x_Channel_Activity_Detection_Interrupt/SX128x_Channel_Activity_Detection_Interrupt.ino +++ b/examples/SX128x/SX128x_Channel_Activity_Detection_Interrupt/SX128x_Channel_Activity_Detection_Interrupt.ino @@ -1,16 +1,16 @@ /* - RadioLib SX128x Channel Activity Detection Example + RadioLib SX128x Channel Activity Detection Example - This example uses SX1280 to scan the current LoRa - channel and detect ongoing LoRa transmissions. + This example uses SX1280 to scan the current LoRa + channel and detect ongoing LoRa transmissions. - Other modules from SX128x family can also be used. + Other modules from SX128x family can also be used. - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx128x---lora-modem + For default module settings, see the wiki page +https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx128x---lora-modem - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -23,9 +23,13 @@ // BUSY pin: 9 SX1280 radio = new Module(10, 2, 3, 9); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1280 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/SX128x/SX128x_FLRC_Modem/SX128x_FLRC_Modem.ino b/examples/SX128x/SX128x_FLRC_Modem/SX128x_FLRC_Modem.ino index 3216d365..fb6bb1a5 100644 --- a/examples/SX128x/SX128x_FLRC_Modem/SX128x_FLRC_Modem.ino +++ b/examples/SX128x/SX128x_FLRC_Modem/SX128x_FLRC_Modem.ino @@ -1,19 +1,19 @@ /* - RadioLib SX128x FLRC Modem Example + RadioLib SX128x FLRC Modem Example - This example shows how to use FLRC modem in SX128x chips. + This example shows how to use FLRC modem in SX128x chips. - NOTE: The sketch below is just a guide on how to use - FLRC modem, so this code should not be run directly! - Instead, modify the other examples to use FLRC - modem and use the appropriate configuration - methods. + NOTE: The sketch below is just a guide on how to use + FLRC modem, so this code should not be run directly! + Instead, modify the other examples to use FLRC + modem and use the appropriate configuration + methods. - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx128x---flrc-modem + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx128x---flrc-modem - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -26,9 +26,13 @@ // BUSY pin: 9 SX1280 radio = new Module(10, 2, 3, 9); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1280 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/SX128x/SX128x_GFSK_Modem/SX128x_GFSK_Modem.ino b/examples/SX128x/SX128x_GFSK_Modem/SX128x_GFSK_Modem.ino index 447abf9a..05c8e6c2 100644 --- a/examples/SX128x/SX128x_GFSK_Modem/SX128x_GFSK_Modem.ino +++ b/examples/SX128x/SX128x_GFSK_Modem/SX128x_GFSK_Modem.ino @@ -1,19 +1,19 @@ /* - RadioLib SX128x GFSK Modem Example + RadioLib SX128x GFSK Modem Example - This example shows how to use GFSK modem in SX128x chips. + This example shows how to use GFSK modem in SX128x chips. - NOTE: The sketch below is just a guide on how to use - GFSK modem, so this code should not be run directly! - Instead, modify the other examples to use GFSK - modem and use the appropriate configuration - methods. + NOTE: The sketch below is just a guide on how to use + GFSK modem, so this code should not be run directly! + Instead, modify the other examples to use GFSK + modem and use the appropriate configuration + methods. - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx128x---gfsk-modem + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx128x---gfsk-modem - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -26,9 +26,13 @@ // BUSY pin: 9 SX1280 radio = new Module(10, 2, 3, 9); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1280 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/SX128x/SX128x_Ranging/SX128x_Ranging.ino b/examples/SX128x/SX128x_Ranging/SX128x_Ranging.ino index f69dfa98..9f6a92b6 100644 --- a/examples/SX128x/SX128x_Ranging/SX128x_Ranging.ino +++ b/examples/SX128x/SX128x_Ranging/SX128x_Ranging.ino @@ -1,21 +1,21 @@ /* - RadioLib SX128x Ranging Example + RadioLib SX128x Ranging Example - This example performs ranging exchange between two - SX1280 LoRa radio modules. Ranging allows to measure - distance between the modules using time-of-flight - measurement. + This example performs ranging exchange between two + SX1280 LoRa radio modules. Ranging allows to measure + distance between the modules using time-of-flight + measurement. - Only SX1280 and SX1282 without external RF switch support ranging! + Only SX1280 and SX1282 without external RF switch support ranging! - Note that to get accurate ranging results, calibration is needed! - The process is described in Semtech SX1280 Application Note AN1200.29 + Note that to get accurate ranging results, calibration is needed! + The process is described in Semtech SX1280 Application Note AN1200.29 - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx128x---lora-modem + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx128x---lora-modem - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -28,9 +28,13 @@ // BUSY pin: 9 SX1280 radio = new Module(10, 2, 3, 9); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1280 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/SX128x/SX128x_Receive_Blocking/SX128x_Receive_Blocking.ino b/examples/SX128x/SX128x_Receive_Blocking/SX128x_Receive_Blocking.ino index 024c99f9..809b2c4a 100644 --- a/examples/SX128x/SX128x_Receive_Blocking/SX128x_Receive_Blocking.ino +++ b/examples/SX128x/SX128x_Receive_Blocking/SX128x_Receive_Blocking.ino @@ -35,9 +35,13 @@ // BUSY pin: 9 SX1280 radio = new Module(10, 2, 3, 9); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1280 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/SX128x/SX128x_Receive_Interrupt/SX128x_Receive_Interrupt.ino b/examples/SX128x/SX128x_Receive_Interrupt/SX128x_Receive_Interrupt.ino index ca63cb78..0ca0406c 100644 --- a/examples/SX128x/SX128x_Receive_Interrupt/SX128x_Receive_Interrupt.ino +++ b/examples/SX128x/SX128x_Receive_Interrupt/SX128x_Receive_Interrupt.ino @@ -1,24 +1,24 @@ /* - RadioLib SX128x Receive with Interrupts Example + RadioLib SX128x Receive with Interrupts Example - This example listens for LoRa transmissions and tries to - receive them. Once a packet is received, an interrupt is - triggered. To successfully receive data, the following - settings have to be the same on both transmitter - and receiver: - - carrier frequency - - bandwidth - - spreading factor - - coding rate - - sync word + This example listens for LoRa transmissions and tries to + receive them. Once a packet is received, an interrupt is + triggered. To successfully receive data, the following + settings have to be the same on both transmitter + and receiver: + - carrier frequency + - bandwidth + - spreading factor + - coding rate + - sync word - Other modules from SX128x family can also be used. + Other modules from SX128x family can also be used. - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx128x---lora-modem + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx128x---lora-modem - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -31,9 +31,13 @@ // BUSY pin: 9 SX1280 radio = new Module(10, 2, 3, 9); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1280 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/SX128x/SX128x_Settings/SX128x_Settings.ino b/examples/SX128x/SX128x_Settings/SX128x_Settings.ino index eb29c119..5792dc07 100644 --- a/examples/SX128x/SX128x_Settings/SX128x_Settings.ino +++ b/examples/SX128x/SX128x_Settings/SX128x_Settings.ino @@ -1,24 +1,24 @@ /* - RadioLib SX128x Settings Example + RadioLib SX128x Settings Example - This example shows how to change all the properties of LoRa transmission. - RadioLib currently supports the following settings: - - pins (SPI slave select, DIO1, DIO2, BUSY pin) - - carrier frequency - - bandwidth - - spreading factor - - coding rate - - output power during transmission - - CRC - - preamble length + This example shows how to change all the properties of LoRa transmission. + RadioLib currently supports the following settings: + - pins (SPI slave select, DIO1, DIO2, BUSY pin) + - carrier frequency + - bandwidth + - spreading factor + - coding rate + - output power during transmission + - CRC + - preamble length - Other modules from SX128x family can also be used. + Other modules from SX128x family can also be used. - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx128x---lora-modem + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx128x---lora-modem - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -38,9 +38,13 @@ SX1280 radio1 = new Module(10, 2, 3, 9); // BUSY pin: 6 SX1281 radio2 = new Module(8, 4, 5, 6); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1282 radio3 = RadioShield.ModuleB; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio3 = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/SX128x/SX128x_Transmit_Blocking/SX128x_Transmit_Blocking.ino b/examples/SX128x/SX128x_Transmit_Blocking/SX128x_Transmit_Blocking.ino index 2727555d..ea0fb169 100644 --- a/examples/SX128x/SX128x_Transmit_Blocking/SX128x_Transmit_Blocking.ino +++ b/examples/SX128x/SX128x_Transmit_Blocking/SX128x_Transmit_Blocking.ino @@ -30,9 +30,13 @@ // BUSY pin: 9 SX1280 radio = new Module(10, 2, 3, 9); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1280 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/SX128x/SX128x_Transmit_Interrupt/SX128x_Transmit_Interrupt.ino b/examples/SX128x/SX128x_Transmit_Interrupt/SX128x_Transmit_Interrupt.ino index 17d462a1..1c760d5a 100644 --- a/examples/SX128x/SX128x_Transmit_Interrupt/SX128x_Transmit_Interrupt.ino +++ b/examples/SX128x/SX128x_Transmit_Interrupt/SX128x_Transmit_Interrupt.ino @@ -27,9 +27,13 @@ // BUSY pin: 9 SX1280 radio = new Module(10, 2, 3, 9); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1280 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ // save transmission state between loops int transmissionState = RADIOLIB_ERR_NONE; diff --git a/examples/Si443x/Si443x_Receive_Blocking/Si443x_Receive_Blocking.ino b/examples/Si443x/Si443x_Receive_Blocking/Si443x_Receive_Blocking.ino index 821be023..8ab9942b 100644 --- a/examples/Si443x/Si443x_Receive_Blocking/Si443x_Receive_Blocking.ino +++ b/examples/Si443x/Si443x_Receive_Blocking/Si443x_Receive_Blocking.ino @@ -32,9 +32,13 @@ // SDN pin: 9 Si4432 radio = new Module(10, 2, 9); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//Si4432 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/Si443x/Si443x_Receive_Interrupt/Si443x_Receive_Interrupt.ino b/examples/Si443x/Si443x_Receive_Interrupt/Si443x_Receive_Interrupt.ino index b3e1c9a7..45f18179 100644 --- a/examples/Si443x/Si443x_Receive_Interrupt/Si443x_Receive_Interrupt.ino +++ b/examples/Si443x/Si443x_Receive_Interrupt/Si443x_Receive_Interrupt.ino @@ -1,17 +1,17 @@ /* - RadioLib Si443x Receive with Interrupts Example + RadioLib Si443x Receive with Interrupts Example - This example listens for FSK transmissions and tries to - receive them. Once a packet is received, an interrupt is - triggered. + This example listens for FSK transmissions and tries to + receive them. Once a packet is received, an interrupt is + triggered. - Other modules from Si443x/RFM2x family can also be used. + Other modules from Si443x/RFM2x family can also be used. - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#si443xrfm2x + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#si443xrfm2x - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -23,9 +23,13 @@ // SDN pin: 9 Si4432 radio = new Module(10, 2, 9); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//Si4432 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/Si443x/Si443x_Settings/Si443x_Settings.ino b/examples/Si443x/Si443x_Settings/Si443x_Settings.ino index ab911e58..39a9dbe2 100644 --- a/examples/Si443x/Si443x_Settings/Si443x_Settings.ino +++ b/examples/Si443x/Si443x_Settings/Si443x_Settings.ino @@ -1,21 +1,21 @@ /* - RadioLib Si443x Settings Example + RadioLib Si443x Settings Example - This example shows how to change all the properties of RF69 radio. - RadioLib currently supports the following settings: - - pins (SPI slave select, nIRQ, shutdown) - - carrier frequency - - bit rate - - receiver bandwidth - - frequency deviation - - output power during transmission - - sync word + This example shows how to change all the properties of RF69 radio. + RadioLib currently supports the following settings: + - pins (SPI slave select, nIRQ, shutdown) + - carrier frequency + - bit rate + - receiver bandwidth + - frequency deviation + - output power during transmission + - sync word - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#si443xrfm2x + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#si443xrfm2x - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -33,9 +33,13 @@ Si4432 radio1 = new Module(10, 2, 9); // SDN pin: 7 Si4432 radio2 = new Module(8, 3, 7); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//Si4432 radio3 = RadioShield.ModuleB; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio3 = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/Si443x/Si443x_Transmit_Blocking/Si443x_Transmit_Blocking.ino b/examples/Si443x/Si443x_Transmit_Blocking/Si443x_Transmit_Blocking.ino index 240cd31b..1137482b 100644 --- a/examples/Si443x/Si443x_Transmit_Blocking/Si443x_Transmit_Blocking.ino +++ b/examples/Si443x/Si443x_Transmit_Blocking/Si443x_Transmit_Blocking.ino @@ -29,9 +29,13 @@ // SDN pin: 9 Si4432 radio = new Module(10, 2, 9); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//Si4432 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/Si443x/Si443x_Transmit_Interrupt/Si443x_Transmit_Interrupt.ino b/examples/Si443x/Si443x_Transmit_Interrupt/Si443x_Transmit_Interrupt.ino index 094e3bdb..44501860 100644 --- a/examples/Si443x/Si443x_Transmit_Interrupt/Si443x_Transmit_Interrupt.ino +++ b/examples/Si443x/Si443x_Transmit_Interrupt/Si443x_Transmit_Interrupt.ino @@ -25,9 +25,13 @@ // SDN pin: 9 Si4432 radio = new Module(10, 2, 9); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//Si4432 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ // save transmission state between loops int transmissionState = RADIOLIB_ERR_NONE; diff --git a/examples/Stream/Stream_Receive/Stream_Receive.ino b/examples/Stream/Stream_Receive/Stream_Receive.ino index e30f9378..0abffd17 100644 --- a/examples/Stream/Stream_Receive/Stream_Receive.ino +++ b/examples/Stream/Stream_Receive/Stream_Receive.ino @@ -1,24 +1,24 @@ /* - RadioLib Stream Receive Example + RadioLib Stream Receive Example - This example shows how to receive data in "Stream" mode. - In this mode, arbitrary length of data may be sent, up to - "infinite" continuous transmission between two devices. + This example shows how to receive data in "Stream" mode. + In this mode, arbitrary length of data may be sent, up to + "infinite" continuous transmission between two devices. - Caveats: - - CRC of the payload is not supported - - the length of the payload must be known in advance + Caveats: + - CRC of the payload is not supported + - the length of the payload must be known in advance - Modules that can be used for Stream are: - - SX127x/RFM9x (FSK mode only) - - RF69 - - SX1231 + Modules that can be used for Stream are: + - SX127x/RFM9x (FSK mode only) + - RF69 + - SX1231 - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx127xrfm9x---lora-modem + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx127xrfm9x---lora-modem - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -31,9 +31,13 @@ // DIO1 pin: 3 SX1278 radio = new Module(10, 2, 9, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/Stream/Stream_Transmit/Stream_Transmit.ino b/examples/Stream/Stream_Transmit/Stream_Transmit.ino index a3c6fb93..45b93d38 100644 --- a/examples/Stream/Stream_Transmit/Stream_Transmit.ino +++ b/examples/Stream/Stream_Transmit/Stream_Transmit.ino @@ -1,24 +1,24 @@ /* - RadioLib Stream Transmit Example + RadioLib Stream Transmit Example - This example shows how to transmit data in "Stream" mode. - In this mode, arbitrary length of data may be sent, up to - "infinite" continuous transmission between two devices. + This example shows how to transmit data in "Stream" mode. + In this mode, arbitrary length of data may be sent, up to + "infinite" continuous transmission between two devices. - Caveats: - - CRC of the payload is not supported - - the length of the payload must be known in advance + Caveats: + - CRC of the payload is not supported + - the length of the payload must be known in advance - Modules that can be used for Stream are: - - SX127x/RFM9x (FSK mode only) - - RF69 - - SX1231 + Modules that can be used for Stream are: + - SX127x/RFM9x (FSK mode only) + - RF69 + - SX1231 - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx127xrfm9x---lora-modem + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx127xrfm9x---lora-modem - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -31,9 +31,13 @@ // DIO1 pin: 3 SX1278 radio = new Module(10, 2, 9, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//SX1278 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ // save transmission state between loops int transmissionState = RADIOLIB_ERR_NONE; diff --git a/examples/nRF24/nRF24_Receive_Blocking/nRF24_Receive_Blocking.ino b/examples/nRF24/nRF24_Receive_Blocking/nRF24_Receive_Blocking.ino index b23e5e99..a3028cda 100644 --- a/examples/nRF24/nRF24_Receive_Blocking/nRF24_Receive_Blocking.ino +++ b/examples/nRF24/nRF24_Receive_Blocking/nRF24_Receive_Blocking.ino @@ -29,9 +29,13 @@ // CE pin: 3 nRF24 radio = new Module(10, 2, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//nRF24 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/nRF24/nRF24_Receive_Interrupt/nRF24_Receive_Interrupt.ino b/examples/nRF24/nRF24_Receive_Interrupt/nRF24_Receive_Interrupt.ino index 36622d6d..d081ff76 100644 --- a/examples/nRF24/nRF24_Receive_Interrupt/nRF24_Receive_Interrupt.ino +++ b/examples/nRF24/nRF24_Receive_Interrupt/nRF24_Receive_Interrupt.ino @@ -1,20 +1,20 @@ /* - RadioLib nRF24 Receive Example + RadioLib nRF24 Receive Example - This example listens for FSK transmissions using nRF24 2.4 GHz radio module. - Once a packet is received, an interrupt is triggered. - To successfully receive data, the following settings have to be the same - on both transmitter and receiver: - - carrier frequency - - data rate - - transmit pipe on transmitter must match receive pipe - on receiver + This example listens for FSK transmissions using nRF24 2.4 GHz radio module. + Once a packet is received, an interrupt is triggered. + To successfully receive data, the following settings have to be the same + on both transmitter and receiver: + - carrier frequency + - data rate + - transmit pipe on transmitter must match receive pipe + on receiver - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#nrf24 + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#nrf24 - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -26,9 +26,13 @@ // CE pin: 3 nRF24 radio = new Module(10, 2, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//nRF24 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/nRF24/nRF24_Transmit_Blocking/nRF24_Transmit_Blocking.ino b/examples/nRF24/nRF24_Transmit_Blocking/nRF24_Transmit_Blocking.ino index c553eab2..603b4bd5 100644 --- a/examples/nRF24/nRF24_Transmit_Blocking/nRF24_Transmit_Blocking.ino +++ b/examples/nRF24/nRF24_Transmit_Blocking/nRF24_Transmit_Blocking.ino @@ -1,19 +1,19 @@ /* - RadioLib nRF24 Transmit Example + RadioLib nRF24 Transmit Example - This example transmits packets using nRF24 2.4 GHz radio module. - Each packet contains up to 32 bytes of data, in the form of: - - Arduino String - - null-terminated char array (C-string) - - arbitrary binary data (byte array) + This example transmits packets using nRF24 2.4 GHz radio module. + Each packet contains up to 32 bytes of data, in the form of: + - Arduino String + - null-terminated char array (C-string) + - arbitrary binary data (byte array) - Packet delivery is automatically acknowledged by the receiver. + Packet delivery is automatically acknowledged by the receiver. - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#nrf24 + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#nrf24 - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -25,9 +25,13 @@ // CE pin: 3 nRF24 radio = new Module(10, 2, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//nRF24 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ void setup() { Serial.begin(9600); diff --git a/examples/nRF24/nRF24_Transmit_Interrupt/nRF24_Transmit_Interrupt.ino b/examples/nRF24/nRF24_Transmit_Interrupt/nRF24_Transmit_Interrupt.ino index 58c18e73..0751e511 100644 --- a/examples/nRF24/nRF24_Transmit_Interrupt/nRF24_Transmit_Interrupt.ino +++ b/examples/nRF24/nRF24_Transmit_Interrupt/nRF24_Transmit_Interrupt.ino @@ -1,19 +1,19 @@ /* - RadioLib nRF24 Transmit with Interrupts Example + RadioLib nRF24 Transmit with Interrupts Example - This example transmits packets using nRF24 2.4 GHz radio module. - Each packet contains up to 32 bytes of data, in the form of: - - Arduino String - - null-terminated char array (C-string) - - arbitrary binary data (byte array) + This example transmits packets using nRF24 2.4 GHz radio module. + Each packet contains up to 32 bytes of data, in the form of: + - Arduino String + - null-terminated char array (C-string) + - arbitrary binary data (byte array) - Packet delivery is automatically acknowledged by the receiver. + Packet delivery is automatically acknowledged by the receiver. - For default module settings, see the wiki page - https://github.com/jgromes/RadioLib/wiki/Default-configuration#nrf24 + For default module settings, see the wiki page + https://github.com/jgromes/RadioLib/wiki/Default-configuration#nrf24 - For full API reference, see the GitHub Pages - https://jgromes.github.io/RadioLib/ + For full API reference, see the GitHub Pages + https://jgromes.github.io/RadioLib/ */ // include the library @@ -25,9 +25,13 @@ // CE pin: 3 nRF24 radio = new Module(10, 2, 3); -// or using RadioShield -// https://github.com/jgromes/RadioShield -//nRF24 radio = RadioShield.ModuleA; +// or detect the pinout automatically using RadioBoards +// https://github.com/radiolib-org/RadioBoards +/* +#define RADIO_BOARD_AUTO +#include +Radio radio = new RadioModule(); +*/ // save transmission state between loops int transmissionState = RADIOLIB_ERR_NONE;