Added the required pin definition and settings for the LoRa transceiver (RFM95W 868 MHz) replacing the NRF24L01

This commit is contained in:
Th3maz1ng 2025-12-26 12:25:36 +01:00
parent ac11fa4434
commit 7667859a27

View File

@ -18,13 +18,12 @@
#define ADC_QUANTUM 0.0033017578125 //ADC_VREF / ADC_RESOLUTION -> 3.314 and 10 bits (1024) in my case #define ADC_QUANTUM 0.0033017578125 //ADC_VREF / ADC_RESOLUTION -> 3.314 and 10 bits (1024) in my case
#define VOLTAGE_DIV_COEFF 1.321127673363577 //(R1 + R2)/R2 #define VOLTAGE_DIV_COEFF 1.321127673363577 //(R1 + R2)/R2
//NRF Radio config part //RFM95 LoRa Radio config part
#define RADIO_CHANNEL 108 //0-125 #define LORA_BAND (868E6) // LoRa used frequency is 868 MHz in the EU
#define RADIO_NODE_ADDRESS "WEST1" //Weather Station 1 network because the mail box is connected on it #define LORA_SPREADING_FACTOR (10) // LoRa modulation spreading factor 6 to 12
#define RADIO_PA_LEVEL RF24_PA_MAX //RF24_PA_MIN,RF24_PA_LOW,RF24_PA_HIGH,RF24_PA_MAX #define RFM95W_ENABLE_CRC (true) // Set CRC check for the frame
#define ENABLE_LNA true //true or false #define RFM95W_TX_POWER (17) //2 to 20 dB
#define RADIO_DATARATE RF24_250KBPS //Slow datarate to maximize range #define MAX_SEND_ROUND_RETRIES (3) //Sends the packet 3 times
#define MAX_SEND_ROUND_RETRIES 5 //If no ACK is received, tries to resend a MAX_SEND_ROUND_RETRIES-1 more times
//Increase this parameter if the RF link is bad. //Increase this parameter if the RF link is bad.
//Pin config part //Pin config part
@ -33,9 +32,10 @@ typedef enum
D2_EXTERNAL_INT = 2, D2_EXTERNAL_INT = 2,
D4_LDO_EN = 4, D4_LDO_EN = 4,
D5_BAT_V_SENS_EN = 5, D5_BAT_V_SENS_EN = 5,
D6_NRF_CE = 6, D6_RFM_RST = 6,
D7_SWITCH_V_SENS_EN = 7, D7_SWITCH_V_SENS_EN = 7,
D10_NRF_CS = 10, D8_RFM_DI0 = 8,
D10_RFM_CS = 10,
D11_MOSI = 11, D11_MOSI = 11,
D12_MISO = 12, D12_MISO = 12,
D13_SCK = 13, D13_SCK = 13,