This program is guided to help establish a connection between two RFM95 900MHz LoRa radio modules using Maxim Integrated's Feather MCUs (MAX32630FTHR Mbed and the MAX32620FTHR Mbed). Once the radios are configured after powering on and if the radios are wired correctly, the two radios will self identify as either a master or a slave, and will then proceed to PING and PONG back and forth. Information about what is happening between the radios can be seen if the two boards are hooked up to a USB COM port through the included DAPLINK/MAX32625PICO modules.

Dependencies:   BufferedSerial SX1276GenericLib USBDeviceHT max32630fthr

Fork of MAX326xxFTHR_LoRa_PingPong by Devin Alexander

Revision:
7:6a8a82bfb0c6
Parent:
6:1b598b0e52e4
Child:
8:3b0d7b4ff28f
--- a/SX1276GenericPingPong/GenericPingPong.cpp	Fri May 19 09:54:10 2017 +0000
+++ b/SX1276GenericPingPong/GenericPingPong.cpp	Fri May 19 13:59:59 2017 +0000
@@ -24,7 +24,7 @@
 
 #if USE_MODEM_LORA == 1
 
-#define LORA_BANDWIDTH          LORA_BANKWIDTH_125kHz
+#define LORA_BANDWIDTH          125000  // LoRa default, details in SX1276::BandwidthMap
 #define LORA_SPREADING_FACTOR   LORA_SF7
 #define LORA_CODINGRATE         LORA_ERROR_CODING_RATE_4_5
 
@@ -131,15 +131,7 @@
     dprintf("Freqency: %.1f", (double)RF_FREQUENCY/1000000.0);
     dprintf("TXPower: %d dBm",  TX_OUTPUT_POWER);
 #if USE_MODEM_LORA == 1
-    if (LORA_BANDWIDTH == LORA_BANKWIDTH_125kHz) {
-        dprintf("Bandwidth: %d kHz", 125);
-    } else if (LORA_BANDWIDTH == LORA_BANKWIDTH_250kHz) {
-        dprintf("Bandwidth: %d kHz",  250);
-    } else if (LORA_BANDWIDTH == LORA_BANKWIDTH_500kHz) {
-        dprintf("Bandwidth: %d kHz",  500);
-    } else {
-        dprintf("Unkown Bandwidth: %d kHz",  LORA_BANDWIDTH);
-    }
+    dprintf("Bandwidth: %d kHz", LORA_BANDWIDTH);
     dprintf("Spreading factor: SF%d", LORA_SPREADING_FACTOR);
 #elif USE_MODEM_FSK == 1
     dprintf("Bandwidth: %d kHz",  FSK_BANDWIDTH);