 
 byte ledState = HIGH;             // ledState used to set the LED
 byte msgId = 0;
-
-
-volatile byte wd_check = 0; // A number for the watchdog timerer to check
-
-ISR(WDT_vect) 
-{
-  // Check that there have been about 4 seconds, since the last check
-  if (wd_check > 2 && wd_check < 6) {
-    wd_check = 0;
-    // Turn on watchdog again. 
-    // See 8.5.2 "To avoid the Watchdog Reset, WDIE must be set after each interrupt"
-    WDTCR |= (1 << WDIE);
-  }
-  // Failed the test so a reset will occur on the next watchdog timeout.
-}
+byte wd_check = 0;
 
 long readVcc() {
   // Read 1.1V reference against AVcc


#include <util/delay.h>
#include <VirtualWire.h>



  // Cannot use millis() as timer 0 is used by virtualwire on Attiny85
  _delay_ms(1000);
  
  // Reset watchdog so he knows all is well.
  wdt_reset();

  wd_check = 1;
  ++msgId;
}

void watchdog_setup()
{
  // Reset after 8 seconds, 
  // unless wdt_reset(); has been successfully called
  wdt_enable(WDTO_8S);
}

