 
 void setup() 
 {
+  ADCSRA = 0; // turn off ADC
+  
   pinMode(LED_DEBUG, OUTPUT);     
   pinMode(PIN_TX, OUTPUT); 
   pinMode(PIN_WAKEUP_SELF, INPUT);
-  pinMode(PIN_WAKEUP_MASTER, OUTPUT); 
+  pinMode(PIN_MISO, OUTPUT); 
 
-  
-  digitalWrite(PIN_WAKEUP_MASTER, LOW);
+  // Low on MISO tells atmega to sleep
+  digitalWrite(PIN_MISO, LOW);
 
-  //TinyWireS.begin(I2C_SLAVE_ADDR);
+ 
 
   // pin change interrupt (example for D4)
   PCMSK  |= bit (PCINT4);  // want pin D4 / pin 3

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

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


 
#include <util/delay.h>
