   start = millis();
 
   while (i < SAMPLES_TO_AVERAGE) {
-    pulse.fetchLedData();
-    red += pulse.ps1;
-    IR1 += pulse.ps2;
-    IR2 += pulse.ps3;
+    fetchLedData();
+    red += ps1;
+    IR1 += ps2;
+    IR2 += ps3;
     i++;
   }
 


  Serial.println("Bottom of Main");
  //Sleep for 5 minutes or until interrupt
  RFduino_ULPDelay(MINUTES(1));

}



int FRAMAddress = 80; //I2C Address for FRAM
int interval = 500; //500 ms between advertisement transmission
int ExpanderAddress = B0111000;
int samples = TMP006_CFG_8SAMPLE; // # of samples per reading, can be 1 / 2 / 4 / 8 / 16
int lastButtonState = LOW;
long button_holdtime = 2000;
int ledflash = 5;
