     Serial.begin(9600); 
     pinMode(LED_DEBUG, OUTPUT); 
     
-    pinMode(PIN_WAKEUP, INPUT);
     pinMode(PIN_TX, OUTPUT); 
 
     

#define LED_DEBUG 13
#define PIN_TX 6          // PD6
#define PIN_PERIF_POWER 7 // PD7
#define PIN_WAKEUP 2      // INT0
#define PIN_LDR  0        // PC0

#define SLEEP_FLAG_STAYAWAKE 0  // Dont sleep
#define SLEEP_FLAG_IDLE 1       // Gone to sleep because nothing to do
#define SLEEP_FLAG_DARK 2       // Gone to sleep because it is dark
#define AWAKE_TX_MAX 3 // How many transmissions before sleeping

#define DARK_THRESHOLD 500 // sleep when darker than this

#define WD_DO_STUFF 8 // How many watchdog interupts before doing real work.


            awake_tx_count = 0;
            // Watchdog will wake us up in 8 seconds time.
            goToSleep(SLEEP_FLAG_IDLE);
        }        
    }
}

