  ***************************************************/
 ISR(WDT_vect)
 {
-  Serial.print(millis());
-  Serial.println(" Watchdog overrun");
+//  Serial.print(millis());
+//  Serial.println(" Watchdog overrun");
+  Serial.println(" ");
+  Serial.print("Distance: ");
+  Serial.println(distanceToDate);
 }
 
 

 ***************************************************/
void enterSleep(void)
{
  
  /* Setup pin2 as an interrupt and attach handler. */
  sleep_enable();
  attachInterrupt(0, countRPM, LOW);
  delay(100);
  
  set_sleep_mode(SLEEP_MODE_PWR_DOWN);
  
  
  sleep_mode();
  
  /* The program will continue from here. */
  
  /* First thing to do is disable sleep. */
  sleep_disable(); 
}




#include <avr/sleep.h>
#include <avr/power.h>
/*
 *
 */

#define distance 895 


long distanceToDate=0;
int pinOut = 13;
int pin2 = 2;
int hadRound=0;

void countRPM(void)
{
//      Serial.println("In count");

  sleep_disable(); 
  detachInterrupt(0);
  hadRound=1;

}

