add TCXO option in Receive with Interrupts example

Case DIO3 with TCXO, setTCXO.
This commit is contained in:
Sallatiel 2019-08-05 15:46:54 -03:00 committed by GitHub
parent f349fbc3f0
commit 3c62726aca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,6 +44,28 @@ void setup() {
while (true); 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 // set the function that will be called
// when new packet is received // when new packet is received
lora.setDio1Action(setFlag); lora.setDio1Action(setFlag);