From 305e187bfe73695755887f38c97810d23b220e1a Mon Sep 17 00:00:00 2001 From: jgromes Date: Sat, 4 Jul 2020 12:03:26 +0200 Subject: [PATCH] [SX1231] Added links to default config wiki page --- .../SX1231/SX1231_Receive/SX1231_Receive.ino | 19 ++++++++----------- .../SX1231_Transmit/SX1231_Transmit.ino | 19 ++++++++----------- 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/examples/SX1231/SX1231_Receive/SX1231_Receive.ino b/examples/SX1231/SX1231_Receive/SX1231_Receive.ino index 727de1e5..18d0354c 100644 --- a/examples/SX1231/SX1231_Receive/SX1231_Receive.ino +++ b/examples/SX1231/SX1231_Receive/SX1231_Receive.ino @@ -7,6 +7,9 @@ interface. Please see RF69 examples for examples on AES, address filtering, interrupts and settings. + 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/ */ @@ -18,24 +21,18 @@ // CS pin: 10 // DIO0 pin: 2 // RESET pin: 3 -SX1231 rf = new Module(10, 2, 3); +SX1231 radio = new Module(10, 2, 3); // or using RadioShield // https://github.com/jgromes/RadioShield -//SX1231 rf = RadioShield.ModuleA; +//SX1231 radio = RadioShield.ModuleA; void setup() { Serial.begin(9600); // initialize SX1231 with default settings Serial.print(F("[SX1231] Initializing ... ")); - // carrier frequency: 434.0 MHz - // bit rate: 48.0 kbps - // Rx bandwidth: 125.0 kHz - // frequency deviation: 50.0 kHz - // output power: 13 dBm - // sync word: 0x2D01 - int state = rf.begin(); + int state = radio.begin(); if (state == ERR_NONE) { Serial.println(F("success!")); } else { @@ -50,12 +47,12 @@ void loop() { // you can receive data as an Arduino String String str; - int state = rf.receive(str); + int state = radio.receive(str); // you can also receive data as byte array /* byte byteArr[8]; - int state = rf.receive(byteArr, 8); + int state = radio.receive(byteArr, 8); */ if (state == ERR_NONE) { diff --git a/examples/SX1231/SX1231_Transmit/SX1231_Transmit.ino b/examples/SX1231/SX1231_Transmit/SX1231_Transmit.ino index e651202a..0f8cd14b 100644 --- a/examples/SX1231/SX1231_Transmit/SX1231_Transmit.ino +++ b/examples/SX1231/SX1231_Transmit/SX1231_Transmit.ino @@ -7,6 +7,9 @@ interface. Please see RF69 examples for examples on AES, address filtering, interrupts and settings. + 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/ */ @@ -18,24 +21,18 @@ // CS pin: 10 // DIO0 pin: 2 // RESET pin: 3 -SX1231 rf = new Module(10, 2, 3); +SX1231 radio = new Module(10, 2, 3); // or using RadioShield // https://github.com/jgromes/RadioShield -//SX1231 rf = RadioShield.ModuleA; +//SX1231 radio = RadioShield.ModuleA; void setup() { Serial.begin(9600); // initialize SX1231 with default settings Serial.print(F("[SX1231] Initializing ... ")); - // carrier frequency: 434.0 MHz - // bit rate: 48.0 kbps - // Rx bandwidth: 125.0 kHz - // frequency deviation: 50.0 kHz - // output power: 13 dBm - // sync word: 0x2D01 - int state = rf.begin(); + int state = radio.begin(); if (state == ERR_NONE) { Serial.println(F("success!")); } else { @@ -49,12 +46,12 @@ void loop() { Serial.print(F("[SX1231] Transmitting packet ... ")); // you can transmit C-string or Arduino string up to 256 characters long - int state = rf.transmit("Hello World!"); + int state = radio.transmit("Hello World!"); // you can also transmit byte array up to 256 bytes long /* byte byteArr[] = {0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF}; - int state = rf.transmit(byteArr, 8); + int state = radio.transmit(byteArr, 8); */ if (state == ERR_NONE) {