   LED_OFF();
 }
 
+//--------------------------------------------------------------------------------------------
+// Bluetooth
+
+void RFduinoBLE_onConnect() {
+  Serial.println("RFduino BLE connection successful");
+  BLUE_LED_ON();
+  state = POLL_SENSORS;
+}
+
+void RFduinoBLE_onDisconnect() {
+  Serial.println("RFduino BLE disconnected");
+  RED_LED_ON();
+  //LED_OFF();
+
+}
+
+void RFduinoBLE_onAdvertisement(bool start) {
+  if (start) {
+    Serial.println("RFduino BLE advertising");
+    GREEN_LED_ON();
+  }
+  else {
+    LED_OFF();
+  }
+}
+
+void RFduinoBLE_onReceive(char *data, int len) {
+  uint8_t myByte = data[0]; // store first char in array to myByte
+  Serial.print("RFduino BLE Received: ");
+  Serial.println(myByte); // print myByte via serial
+}
+
+void RFduinoBLE_onRSSI(int rssi) {
+  //  Serial.print("RFduino BLE RSSI: ");
+  //  Serial.println(rssi); // print rssi value via serial
+}
+
+//--------------------------------------------------------------------------------------------
+// Expander and LEDs
+
 void expanderWrite(int i2caddr, byte data)
 {
   Wire.beginTransmission(i2caddr);
   Wire.write(data);
   Wire.endTransmission();
-}
-
-void RFduinoBLE_onConnect() {
-  Serial.println("RFduino BLE connection successful");
-  BLUE_LED_ON();
-  state = POLL_SENSORS;
-}
-
-void RFduinoBLE_onDisconnect() {
-  Serial.println("RFduino BLE disconnected");
-  RED_LED_ON();
-  //LED_OFF();
-
-}
-
-void RFduinoBLE_onAdvertisement(bool start) {
-  if (start) {
-    Serial.println("RFduino BLE advertising");
-    GREEN_LED_ON();
-  }
-  else {
-    LED_OFF();
-  }
-}
-
-void RFduinoBLE_onReceive(char *data, int len) {
-  uint8_t myByte = data[0]; // store first char in array to myByte
-  Serial.print("RFduino BLE Received: ");
-  Serial.println(myByte); // print myByte via serial
-}
-
-void RFduinoBLE_onRSSI(int rssi) {
-  //  Serial.print("RFduino BLE RSSI: ");
-  //  Serial.println(rssi); // print rssi value via serial
 }
 
 void LED_OFF() {

}

//--------------------------------------------------------------------------------------------
// New Code Section for Heart Rate

int SI1146_Test(int i2caddr) {
  int id;

  Serial.println(HR_read_reg(SI114_REG_CHIP_STAT, 1), HEX);
  Serial.println("end init");
}

//--------------------------------------------------------------------------------------------
// Fram Code

//--------------------------------------------------------------------------------------

