 DallasTemperature sensors(&oneWire);
 
 // arrays to hold device address
-DeviceAddress insideThermometer;
+DeviceAddress temperatureSensor;
+
 boolean tempSensorFound = false;
-
-uint8_t inPin[] = { 9, 11, 12, 13 };
+float latestTemperature = 0.0;
+uint16_t lastUncompDistance = 0;
+
+uint8_t inPin[] = { 9, 10, 11, 12, 13 };
 
 int batteryCountDown = BATTERY_READ_INTERVAL;
 

#define WAKE_INT 2

// Data wire is plugged into port 2 on the Arduino
#define TEMP_SENSOR_ENABLE 10
#define ONE_WIRE_BUS 5

// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)


  sensors.begin();
  tempSensorFound = false;
  if (sensors.getAddress(temperatureSensor, 0)) {
    // set the resolution to 9 bit (Each Dallas/Maxim device is capable of several different resolutions)
    sensors.setResolution(temperatureSensor, 9);
    tempSensorFound = true;
  }

//digitalWrite( TEMP_SENSOR_ENABLE, LOW);

  batteryCountDown = BATTERY_READ_INTERVAL;
  // Wait for it to be initialised
