 #endif
   DEBUG_PRINT("Initializing");
 
-  rf12_initialize(2, RF12_915MHZ, 100);
+  rf12_initialize(NODE_ID, RF12_915MHZ, NETGROUP);
 
-  pinMode(DIO4, INPUT);
-  digitalWrite(DIO4, HIGH);  // turn on pull up
+  pinMode(DIO4, INPUT_PULLUP);
 }
 
+
 void loop() {
+  float tempc = 0;
   int door_status_4 = digitalRead(DIO4);
   word payload[4] = {0,0,0,0};
 


  Sleepy::loseSomeTime(60000);
}



ISR(WDT_vect) { Sleepy::watchdogEvent(); }


// user settings
//#define DEBUG        // Comment out to disable
const int JEELINK_ID = 1;   // Jeelink is id 1 (or 0 to broadcast)
const int NETGROUP = 100;   // Netgroup everyone is on
const int NODE_ID = 2;      // id of THIS node


// sketch constants
const int DOOR_OPEN = HIGH;    // Door open when signal is HIGH
const int DOOR_CLOSED = LOW;   // Door closed when LOW
const int DIO_OFFSET = 3;      // DIO is port num + 3


// Basic macro for debugging
// Ideally change this to a function once I figure out how to accept anything
#ifdef DEBUG
  #define DEBUG_PRINT(x) Serial.println(x)
#else
  #define DEBUG_PRINT(x)
#endif


// TEMP421 code thanks to http://ka1kjz.com (my bookmark no longer points to the source
// posting though, should still be on there somewhere
