Implemented LED Indicator Patterns

Dependencies:   mbed

Revision:
19:6f88d1cabaca
Parent:
18:0a4de80c02a6
Child:
20:e75b3340d1c7
diff -r 0a4de80c02a6 -r 6f88d1cabaca app/main.cpp
--- a/app/main.cpp	Wed Jan 23 19:23:44 2019 +0000
+++ b/app/main.cpp	Fri Jan 25 22:58:17 2019 +0000
@@ -146,6 +146,7 @@
 AnalogIn BAT_PIN(A1);
 AnalogIn LIGHT_1_PIN(A2);
 AnalogIn LIGHT_2_PIN(A5);
+AnalogIn RH_PIN(PC_2);
 AnalogIn VCE_PIN(PB_1);
 
 InterruptIn button1(USER_BUTTON);
@@ -454,7 +455,7 @@
         LoRaMacUplinkStatus.Buffer = NULL;
         LoRaMacUplinkStatus.BufferSize = 0;
         SerialDisplayUpdateFrameType( false );
-        SerialDisplayPrintDebugStatus( LoRaMacQueryTxPossible( AppDataSize, &txInfo ) );
+        // SerialDisplayPrintDebugStatus( LoRaMacQueryTxPossible( AppDataSize, &txInfo ) );
         
     }
     else
@@ -902,11 +903,12 @@
     int vce_reading = VCE_PIN.read()*1000;
     int light_1_reading = LIGHT_1_PIN.read()*1000 - vce_reading;
     int light_2_reading = LIGHT_2_PIN.read()*1000 - vce_reading;
+    int rh_reading = RH_PIN.read()*1000 - vce_reading;
     
     measurements[1] = (uint8_t) (battery_reading/10);
     measurements[2] = (uint8_t) light_1_reading;
     measurements[3] = (uint8_t) light_2_reading;
-    measurements[4] = (uint8_t) 0; // TODO: Update for RH
+    measurements[4] = (uint8_t) rh_reading;
     
     // End test
     relayPin = 0;
@@ -1221,8 +1223,8 @@
                     TimerSetValue( &TxNextPacketTimer, TxDutyCycleTime );
                     TimerStart( &TxNextPacketTimer );
                     
-                    char my_str[17] = "Scheduled Resend";
-                    SerialDisplayPrintDebugLine( my_str, 17 );
+                    // char my_str[17] = "Scheduled Resend";
+                    // SerialDisplayPrintDebugLine( my_str, 17 );
                 }
                 else
                 {