   ds.select(addr);
   ds.write(0x44, 1); // start conversion, with parasite power on at the end
 
+  delay(750); // required wait time for parasitic power
+
   byte present = ds.reset();
   ds.select(addr);
   ds.write(0xBE); // Read Scratchpad
-
 
   for (int i = 0; i < 9; i++) { // we need 9 bytes
     data[i] = ds.read();

  float temperatureSum = tempRead / 16;

  return temperatureSum;

}

void setup(void)
{
  Serial.begin(115200);

  //  SD.begin();

  // Configure digital output connected to rtc module.
  pinMode(RTC_POWER_PIN, OUTPUT);

  // Configure digital output connected to sensor.
  pinMode(TEMP_POWER_PIN, OUTPUT);

  // turn on power to the rtc module
  digitalWrite(RTC_POWER_PIN, HIGH);
  delay(100); // TODO necessary?

  Wire.begin(); // I2C init as master
  RTC.begin();

  // Turn off power to the rtc module.
  digitalWrite(RTC_POWER_PIN, LOW);

  // Turn off power to the sensor.
  digitalWrite(TEMP_POWER_PIN, LOW);

  // Setup the watchdog timer to run an interrupt which
  // wakes the Arduino from sleep every 8 seconds.

  // Note that the default behavior of resetting the Arduino
  // with the watchdog will be disabled.

  // This next section of code is timing critical, so interrupts are disabled.
  // See more details of how to change the watchdog in the ATmega328P datasheet
  // around page 50, Watchdog Timer.
  noInterrupts();

  // Set the watchdog reset bit in the MCU status register to 0.
  MCUSR &= ~(1 << WDRF);

  // Set WDCE and WDE bits in the watchdog control register.
  WDTCSR |= (1 << WDCE) | (1 << WDE);

  // Set watchdog clock prescaler bits to a value of 8 seconds.
  WDTCSR = (1 << WDP0) | (1 << WDP3);

  // Enable watchdog as interrupt only (no reset).
  WDTCSR |= (1 << WDIE);

  // Enable interrupts again.
  interrupts();

  Serial.println(F("Setup complete."));
}

void loop(void)
{
  // Don't do anything unless the watchdog timer interrupt has fired.
  if (watchdogActivated)
  {
    watchdogActivated = false;
    // Increase the count of sleep iterations and take a sensor
    // reading once the max number of iterations has been hit.
    sleepIterations += 1;
    if (sleepIterations >= MAX_SLEEP_ITERATIONS) {
      // Reset the number of sleep iterations.
      sleepIterations = 0;

      delay(ADDITIONAL_SLEEP * 1000);

      // Log the sensor reading
      logSensorReading();
    }
  }

  // Go to sleep!
  sleep();
}


  delay(100);
}

DateTime getTime() {
  digitalWrite(RTC_POWER_PIN, HIGH);
  DateTime now = RTC.now();
  digitalWrite(RTC_POWER_PIN, LOW);
  return now;
}

float getTemp() { //returns the temperature from one DS18S20 in DEG Celsius

  byte data[12];
  byte addr[8];
