   if (!ldr_val) {
     // Too dark (LDR is reading low)
     // Let atmega328p know it should be asleep
-    digitalWrite(PIN_WAKEUP_MASTER, LOW);
+    digitalWrite(PIN_MISO, LOW);
     
     // Sleep untill enough light
     goToSleep();
   } else if (vcc >= 3300) {
     // Tell the Atmega328p that it should be awake now.
-    digitalWrite(PIN_WAKEUP_MASTER, HIGH);
+    digitalWrite(PIN_MISO, HIGH);
   }
   
   

//                  +----+
// see http://www.gammon.com.au/forum/?id=11488&reply=9#reply9

// i2c http://playground.arduino.cc/Code/USIi2c 
// library from http://playground.arduino.cc/uploads/Code/TinyWireS.zip

 
#include <util/delay.h>

#include <avr/power.h>    // Power management
#include <VirtualWire.h>


#define LED_DEBUG 0 
#define PIN_TX 3 // PB3

#define PIN_MISO 1 // PB1  (DO)  -> atmega MISO & external interupt
#define PIN_MOSI 0 // PB0  (DI)  -> atmega MOSI
#define PIN_SCL  2 // PB2 (USCK) -> atmega SCL 

#define PIN_WAKEUP_SELF 4   // PB4 / pin 3 / LDR attached - HIGH = wakeup



byte msgId = 0;
int ldr_val = 0;
