 void loop()
 {
   
-  int ldr_val = analogRead(PIN_LDR);
+  int ldr_val = digitalRead(PIN_WAKEUP_SELF);
 
   digitalWrite(LED_DEBUG, HIGH);
   


 
#include <util/delay.h>
#include <avr/wdt.h>      // Watchdog
#include <avr/sleep.h>    // Sleep Modes
#include <avr/power.h>    // Power management
#include <VirtualWire.h>

#define LED_DEBUG 0 
#define PIN_TX 3 // PB3

#define PIN_WAKEUP_MASTER 1 // PB1 Connected to the atmega328 external interupt pin.

#define PIN_WAKEUP_SELF 4   // PB4 / pin 3 / LDR attached
//#define PIN_LDR 2           // PB4 / pin 3 / A2 - NB: ANALOG pin 2 not digital pin 2

//#define THRESHOLD_DARK 200 // A reading below this is considered dark.

#define I2C_SLAVE_ADDR 100

