 #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 PIN_SOLAR 5 // PC5
 
 #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.
 


  if (sleep_flag == SLEEP_FLAG_DARK) {
    // Turn off watchdog
    wdt_disable();
    // Attach the external interupt to the LDR.
    attachInterrupt(0, wakeUp, HIGH);
  }

  power_all_disable();  // power off ADC, Timer 0 and 1, serial interface

    if (now - tx_last >= tx_interval) {
        tx_last = now;
                
        int solar_read = analogRead(PIN_SOLAR);
 
                
        // Send a transmission
        // int = 5 bytes in transmision string
        // long int = 10 bytes in transmision string
        // byte = 3 bytes in transmision string
        char msg[25]; // string to send
        sprintf(msg, "S,%d,%u,%lu", msgId, solar_read, readVcc());
        Serial.println(msg); 
        vw_send((uint8_t *)msg, strlen(msg));
        vw_wait_tx(); // Wait until the whole message is gone
