LoRa node acquiring random float value and sending to LoRa Server - Working ok

Dependencies:   BufferedSerial SX1276GenericLib_node2 mbed

Fork of DISCO-L072CZ-LRWAN1_LoRa_PingPong by ST

Revision:
12:eaa8be101e07
Parent:
10:f84959c2e044
--- a/main.cpp	Fri Aug 18 07:45:44 2017 +0000
+++ b/main.cpp	Wed Aug 08 22:34:30 2018 +0000
@@ -3,19 +3,21 @@
  * 30826 Garbsen (Hannover) Germany
  * Licensed under the Apache License, Version 2.0);
  */
- #include "main.h"
-
+#include "main.h"
+//#include "mbed_events.h"
+#define MAX_NUMBER_OF_EVENTS            10
 DigitalOut myled(LED1);
 BufferedSerial *ser;
+InterruptIn btn(USER_BUTTON);
 
-int main() {
+int main()
+{
     SystemClock_Config();
     ser = new BufferedSerial(USBTX, USBRX);
-    ser->baud(115200*2);
+    ser->baud(115200);
     ser->format(8);
-    ser->printf("Hello World\n\r");
     myled = 1;
-    
+    btn.fall(&onButtonEvent);
     SX1276PingPong();
 }
 
@@ -25,7 +27,7 @@
 void SystemClock_Config(void)
 {
 #ifdef B_L072Z_LRWAN1_LORA
-    /* 
+    /*
      * The L072Z_LRWAN1_LORA clock setup is somewhat differnt from the Nucleo board.
      * It has no LSE.
      */