From a5027040b8022b6bfb493d7ea0e95762cd423679 Mon Sep 17 00:00:00 2001 From: Sallatiel <37463387+Sallatiel@users.noreply.github.com> Date: Mon, 5 Aug 2019 15:46:17 -0300 Subject: [PATCH] add TCXO option in Transmit Interrupts example Case DIO3 with TCXO, setTCXO. --- .../SX126x_Transmit_Interrupt.ino | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/examples/SX126x/SX126x_Transmit_Interrupt/SX126x_Transmit_Interrupt.ino b/examples/SX126x/SX126x_Transmit_Interrupt/SX126x_Transmit_Interrupt.ino index 1c4e0508..8631312f 100644 --- a/examples/SX126x/SX126x_Transmit_Interrupt/SX126x_Transmit_Interrupt.ino +++ b/examples/SX126x/SX126x_Transmit_Interrupt/SX126x_Transmit_Interrupt.ino @@ -40,6 +40,28 @@ void setup() { while (true); } + // NOTE: Some SX126x modules use TCXO + // (Temprature-Compensated Crystal Oscillator). + // To be able to use these modules, TCXO + // control must be enabled by calling + // setTCXO() and specifying the reference + // voltage. + + /* + Serial.print(F("[SX1262] Setting TCXO reference ... ")); + // enable TCXO + // reference voltage: 1.6 V + // timeout: 5000 us + state = lora.setTCXO(1.6); + if (state == ERR_NONE) { + Serial.println(F("success!")); + } else { + Serial.print(F("failed, code ")); + Serial.println(state); + while (true); + } + */ + // set the function that will be called // when packet transmission is finished lora.setDio1Action(setFlag);