I have a RAK4631 (Arduino boot loader) that i’m coding with VSCODE:
on the “lora” setup:
void setup() {
pinMode(RADIO_PWR_EN, OUTPUT);
digitalWrite(RADIO_PWR_EN, HIGH);
int state = radio.begin(frequency);
if (state == RADIOLIB_ERR_NONE) {
Serial.println(“LoRa SX126X Initialized.\n”);
} else {
Serial.print("Starting LoRa failed! State: "); Serial.println(state);
while (true);
}
radio.setDio1Action(setFlag);
radio.setSpreadingFactor(spreadingFactor);
radio.setBandwidth(signalBandwidth);
radio.setCodingRate(codingRate4);
radio.setCRC(true);
radio.setOutputPower(power);
radio.setCurrentLimit(140);
radio.setRxBoostedGainMode(true);
radio.setDio2AsRfSwitch();
radio.setTCXO(1.8);
}
my question is about the use of RADIO_PWR pin (37 = 1.05) if this works with radio.setDio2AsRfSwitch() or if it is ment to be used manually between Tx and Rx to switch Antena?