From 6eac22c81e48595cd243ec8d24f742641d6427a7 Mon Sep 17 00:00:00 2001 From: jgromes Date: Wed, 6 Feb 2019 19:39:44 +0100 Subject: [PATCH] [SX1231] Example comment fix --- examples/SX1231_Receive/SX1231_Receive.ino | 20 +++++--------------- examples/SX1231_Transmit/SX1231_Transmit.ino | 20 +++++--------------- 2 files changed, 10 insertions(+), 30 deletions(-) diff --git a/examples/SX1231_Receive/SX1231_Receive.ino b/examples/SX1231_Receive/SX1231_Receive.ino index b44f3492..de91f7a6 100644 --- a/examples/SX1231_Receive/SX1231_Receive.ino +++ b/examples/SX1231_Receive/SX1231_Receive.ino @@ -2,6 +2,10 @@ KiteLib SX1231 Receive Example This example receives packets using SX1231 FSK radio module. + + NOTE: SX1231 offers the same features as RF69 and has the same + interface. Please see RF69 examples for examples on AES, + address filtering, interrupts and settings. */ // include the library @@ -20,7 +24,7 @@ void setup() { // Rx bandwidth: 125.0 kHz // frequency deviation: 50.0 kHz // output power: 13 dBm - // sync word: 0x2D 0x01 + // sync word: 0x2D01 byte state = rf.begin(); if (state == ERR_NONE) { Serial.println(F("success!")); @@ -29,20 +33,6 @@ void setup() { Serial.println(state); while (true); } - - // you can change the sync word at runtime - // sync word can be up to 8 non-zero bytes - Serial.print(F("[SX1231] Settings sync word ... ")); - uint8_t syncWord[] = {0x01, 0x23}; - // sync word: 0x01 0x23 - // length: 2 - // tolerated error bits: 0 - state == rf.setSyncWord(syncWord, 2); - if (state == ERR_NONE) { - Serial.println(F("success!")); - } else if (state == ERR_INVALID_SYNC_WORD) { - Serial.println(F("invalid!")); - } } void loop() { diff --git a/examples/SX1231_Transmit/SX1231_Transmit.ino b/examples/SX1231_Transmit/SX1231_Transmit.ino index a4733617..aaf1f365 100644 --- a/examples/SX1231_Transmit/SX1231_Transmit.ino +++ b/examples/SX1231_Transmit/SX1231_Transmit.ino @@ -2,6 +2,10 @@ KiteLib SX1231 Transmit Example This example transmits packets using SX1231 FSK radio module. + + NOTE: SX1231 offers the same features as RF69 and has the same + interface. Please see RF69 examples for examples on AES, + address filtering, interrupts and settings. */ // include the library @@ -20,7 +24,7 @@ void setup() { // Rx bandwidth: 125.0 kHz // frequency deviation: 50.0 kHz // output power: 13 dBm - // sync word: 0x2D 0x01 + // sync word: 0x2D01 int state = rf.begin(); if (state == ERR_NONE) { Serial.println(F("success!")); @@ -29,20 +33,6 @@ void setup() { Serial.println(state); while (true); } - - // you can change the sync word at runtime - // sync word can be up to 8 non-zero bytes - Serial.print(F("[SX1231] Settings sync word ... ")); - uint8_t syncWord[] = {0x01, 0x23}; - // sync word: 0x01 0x23 - // length: 2 - // tolerated error bits: 0 - state == rf.setSyncWord(syncWord, 2); - if (state == ERR_NONE) { - Serial.println(F("success!")); - } else if (state == ERR_INVALID_SYNC_WORD) { - Serial.println(F("invalid!")); - } } void loop() {