attempt to fix posible power issues with the sharp

Dependencies:   ADS1115 BME280 CronoDot SDFileSystem mbed

Fork of Outdoor_UPAS_v1_2_Tboard by scott kelleher

Revision:
18:41ef98db0423
Parent:
17:3e6dda6e6335
Child:
19:b835bfb61e35
--- a/main.cpp	Tue Mar 22 21:18:42 2016 +0000
+++ b/main.cpp	Tue Mar 22 21:33:56 2016 +0000
@@ -19,7 +19,7 @@
 /////////////////////////////////////////////
 I2C                 i2c(PB_9, PB_8);//(D14, D15); SDA,SCL
 Serial              pc(USBTX, USBRX);
-DigitalOut          blower(PA_9, 0);//(D8, 0);
+DigitalOut          pumps(PA_9, 0);//(D8, 0);
 DigitalOut          pbKill(PC_12, 1); // Digital input pin that conncect to the LTC2950 battery charger used to shutdown the UPAS 
 DigitalIn           nINT(PA_15); //Connected but currently unused is a digital ouput pin from LTC2950 battery charger. http://cds.linear.com/docs/en/datasheet/295012fd.pdf
 MCP40D17            DigPot(&i2c);
@@ -591,7 +591,8 @@
 //////////////////////////////////////////////////////////////
 int main(){
     
-    gpsEN = 0;
+    gpsEN = 1;
+    wait(1);
     BT_SW = 1;
     wait(1);
     BT_IRST = 1;
@@ -685,7 +686,7 @@
     microChannel.printf("---\r");
     wait(0.5);
     
-    //RGB_LED.set_led(1,1,1);
+    RGB_LED.set_led(1,1,1);
     while(runReady!=1) {
         wait(1);
         pc.printf("Waiting for BLE instruction");
@@ -742,7 +743,7 @@
 
     DigPot.writeRegister(digital_pot_setpoint);
     wait(1);
-    //blower = 1;
+    pumps = 1;
 
     uint8_t subjectLabelOriginal[8] = {0,};
     E2PROM.read(0x00001, subjectLabelOriginal,8); 
@@ -811,7 +812,7 @@
     sampledVol = 0.0;
     RGB_LED.set_led(0,1,0);
 
-  //  stop.attach(&check_stop, 9);    // check if we should shut down every 9 number seconds, starting after the start.
+    stop.attach(&check_stop, 9);    // check if we should shut down every 9 number seconds, starting after the start.
     logg.attach(&log_data, logInerval);
     //flowCtl.attach(&flowControl, 1);
             
@@ -824,9 +825,9 @@
     while (1) {
         // Do other things...
         /*
-        blower = 1;
+        pumps = 1;
         wait(5);
-        blower = 0;
+        pumps = 0;
         wait(5);
         */
     }