Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: pulga-lorawan-drv SX1272
Diff: main.cpp
- Revision:
 - 10:f6ff8ec221ec
 - Parent:
 - 9:cf555a570349
 - Child:
 - 15:b27ab44dc2c8
 
diff -r cf555a570349 -r f6ff8ec221ec main.cpp
--- a/main.cpp	Wed Mar 31 13:04:22 2021 +0000
+++ b/main.cpp	Mon Apr 12 19:51:51 2021 +0000
@@ -2,7 +2,7 @@
 #include "mbed.h"
 #include "serial.h"
 #include "lora.h"
-
+#include "gps.h"
 
 
 ///////////////////////////////////////
@@ -61,7 +61,9 @@
     dio0.rise(queue.event(&print_packet)); //configure interrupt rotine ro recieve packet
     pc.attach(&SerialRx, RawSerial::RxIrq);
     setup(); //configura sx1272
-       
+    //gps_config();
+    //gps_leBootMsg();
+    //gps_config_gnss ();      
         
     sx1272.writeRegister(REG_OP_MODE,133); //leitura continua
     sx1272.writeRegister(REG_IRQ_FLAGS_MASK,187);//configure interrupt mask to interrupt only when a packet receive and packet envied 
@@ -74,7 +76,10 @@
         if (!button1){
         
            pc.printf("SENDING PING\n");
-              send_data(PING);       
+              send_data(PING); 
+        wait(5);
+           pc.printf("SENDING DATA\n");
+              send_data(DATA);      
             }
          
         wait_ms(50);