for India band 30dBm LoRa Module, DSPLoRa based on code from Semtech and as modified by Sachin Pukale/ TCL/

Dependencies:   mbed Chainable_RGB_LED DigitDisplay LoRaWAN-lib SX1276Lib

Fork of DSP_LoRaWAN by Akshay Mishra

Revision:
3:042ccdf1dd92
Parent:
2:66f94cef0765
Child:
4:fc21b1bd6b15
diff -r 66f94cef0765 -r 042ccdf1dd92 app/main.cpp
--- a/app/main.cpp	Thu Apr 21 10:17:28 2016 +0000
+++ b/app/main.cpp	Mon Jul 18 17:58:40 2016 +0000
@@ -19,7 +19,6 @@
 #include "LoRaMac.h"
 #include "Comissioning.h"
 #include "SerialDisplay.h"
-#include "ChainableLED.h"
 
 #define SEMTECH_BC_APP                 0           //1 : Use Semtech Bootcamp Application
 
@@ -33,9 +32,9 @@
 #define OVER_THE_AIR_ACTIVATION_DUTYCYCLE           10000000  // 10 [s] value in us
 
 /*!
- * Defines the application data transmission duty cycle. 60s, value in [us].
+ * Defines the application data transmission duty cycle. 15s, value in [us].
  */
-#define APP_TX_DUTYCYCLE                            3000000
+#define APP_TX_DUTYCYCLE                            15000000
 
 /*!
  * Defines a random delay for application data transmission duty cycle. 1s,
@@ -58,7 +57,7 @@
  *
  * \remark Please note that when ADR is enabled the end-device should be static
  */
-#define LORAWAN_ADR_ON                              0
+#define LORAWAN_ADR_ON                              1
 
 #if defined( USE_BAND_868 ) || defined( USE_BAND_865 )
 
@@ -205,13 +204,8 @@
 **/
 InterruptIn buttonPressed(D8);
 
-/*!
- * Constructor for the 3-color LED
- */
-#define NUM_LED 3
-ChainableLED color_led(D6, D7, NUM_LED);
-
-#define LIGHT_LEVEL  250         //0 : LED OFF | 250 : Bright White Light
+/* Green LED Lamp Output Definition */
+DigitalOut myGreenLed ( D6 );
 
 
 uint8_t buttonCount = 0;
@@ -227,14 +221,14 @@
     {
         //Lights ON
         ledStatus=1;
-        color_led.setColorRGB(0, LIGHT_LEVEL, LIGHT_LEVEL, LIGHT_LEVEL);
+        myGreenLed=1;
    
     }
     else 
     {
         //Lights OFF
         ledStatus = 0;
-        color_led.setColorRGB(0, 0, 0, 0);
+        myGreenLed = 0;
     }
 }
 
@@ -693,14 +687,14 @@
                 {
                     //Lights ON
                     ledStatus=1;
-                    color_led.setColorRGB(0, LIGHT_LEVEL, LIGHT_LEVEL, LIGHT_LEVEL);
+                    myGreenLed = 1;
                
                 }
                 else 
                 {
                     //Lights OFF
                     ledStatus = 0;
-                    color_led.setColorRGB(0, 0, 0, 0);
+                    myGreenLed = 0;
                 }            
             break;
             
@@ -709,7 +703,8 @@
             LightMode = McpsIndication->Buffer[0];
             if( LightMode )
             {
-                color_led.setColorRGB(0, McpsIndication->Buffer[1], McpsIndication->Buffer[2], McpsIndication->Buffer[3] );
+                myGreenLed = 1;
+                //color_led.setColorRGB(0, McpsIndication->Buffer[1], McpsIndication->Buffer[2], McpsIndication->Buffer[3] );
             }
             break;