First program for SmartCampus LoRaWan

Files at this revision

API Documentation at this revision

Comitter:
bastienvincke
Date:
Wed Feb 05 13:17:21 2020 +0000
Parent:
51:885c5ed083d1
Commit message:
bv

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Wed Feb 05 13:11:05 2020 +0000
+++ b/main.cpp	Wed Feb 05 13:17:21 2020 +0000
@@ -64,17 +64,17 @@
     int16_t retcode;
     char tosend[50] = "Message LoRaWAN";
 
-    //retcode = lorawan.send(MBED_CONF_LORA_APP_PORT, (uint8_t*)tosend, sizeof(tosend),
-    //                       MSG_CONFIRMED_FLAG);
+    retcode = lorawan.send(MBED_CONF_LORA_APP_PORT, (uint8_t*)tosend, sizeof(tosend),
+                           MSG_CONFIRMED_FLAG);
                            
-    SmartFormat payload(50,3);
+    /*SmartFormat payload(50,3);
     payload.add_Digital_Input(1);
     payload.add_Temperature(25.2);
     payload.add_Illuminance(17.3);
 
     retcode = lorawan.send(MBED_CONF_LORA_APP_PORT, payload.getBuffer(), payload.getSize(),
                            MSG_CONFIRMED_FLAG);
-                                                      
+    */                                                  
     if (retcode == LORAWAN_STATUS_WOULD_BLOCK) {
         printf("Cancel sending \r\n");
          lorawan.cancel_sending();