got this sample program for 2+ sx1276 modules to communicate in a ping pong fashion. This program has been tested and verified to run with 915MHz Hope RFM95 modules running with MAX32620FTHR and MAX32630FTHR micro controllers.
Dependencies: BMI160 BufferedSerial SX1276GenericLib USBDeviceHT max32630fthr
Fork of STM32L0_LoRa by
main.cpp
00001 /* 00002 * Copyright (c) 2018 HELIOS Software GmbH 00003 * 30826 Garbsen (Hannover) Germany 00004 * Licensed under the Apache License, Version 2.0); 00005 */ 00006 #include "main.h" 00007 00008 #if defined(TARGET_MAX32630FTHR) // using the RFM95 board 00009 #include "max32630fthr.h" 00010 MAX32630FTHR pegasus(MAX32630FTHR::VIO_3V3); 00011 #endif 00012 00013 DigitalOut myled(LED); 00014 00015 00016 int main() { 00017 #ifdef HELTEC_STM32L4 00018 DigitalOut vext(POWER_VEXT); 00019 vext = POWER_VEXT_ON; 00020 #endif 00021 00022 00023 /* 00024 * inits the Serial or USBSerial when available (230400 baud). 00025 * If the serial uart is not is not connected it swiches to USB Serial 00026 * blinking LED means USBSerial detected, waiting for a connect. 00027 * It waits up to 30 seconds for a USB terminal connections 00028 */ 00029 InitSerial(30*1000, &myled); 00030 dprintf("Welcome to the SX1276GenericLib"); 00031 00032 dprintf("Starting a simple LoRa PingPong"); 00033 SX1276PingPong(); 00034 }
Generated on Fri Jul 22 2022 16:52:08 by 1.7.2