An example project for the Heltec Turtle LoRa board (STM32L4 and SX1276 chips). The projects is only supported for the Nucleo-L432KC board platform in the mbed online and offline compiler environment. Visit www.radioshuttle.de (choose Turtle board) for instructions. Note that most source files and libraries are open source, however some files especially the RadioShuttle core protocol is copyrighted work. Check header for details.

Dependencies:   mbed BufferedSerial SX1276GenericLib OLED_SSD1306 HELIOS_Si7021 NVProperty RadioShuttle-STM32L4 USBDeviceHT

Revision:
5:c6a960febe80
Parent:
3:b5052f3fa638
Child:
9:a988aa7a4652
--- a/main.cpp	Sun Jan 20 16:13:11 2019 +0100
+++ b/main.cpp	Mon Jan 21 11:56:10 2019 +0100
@@ -13,11 +13,9 @@
 #include "RadioTest.h"
 #include "GenericPingPong.h"
 
-volatile uint32_t PendingInterrupts;	// global interrupt mask of received interrupts
 DigitalOut statusLED(LED);
 DigitalOut redLED(LED2);
 InterruptIn buttonIntr(USER_BUTTON);
-LowPowerTimeout timeout;
 
 void switchInput(void) {
 	InterrruptMSG(INT_BUTTON1);
@@ -25,6 +23,7 @@
 
 
 void timerUpdate(void) {
+	static LowPowerTimeout timeout;
 	if (redLED == 0)
 		timeout.attach_us(&timerUpdate, 20000); // setup to call timerUpdate after 20 millis
 	else
@@ -63,6 +62,7 @@
 	/*
 	 * Main event loop, process interrupts and go to sleep
 	 * the green statusLED indicates CPU activity
+	 * the red redLED indicates that low power timeout function is running.
 	 */
 	while(true) {
         while ((readPendingInterrupts() == 0)) {