   }
   return 0;
 }
-
+// End of SRF command functions
 
 void setup() {
-  // initialise serial:
+  // initialise serial interface for debugging/SRF communication:
   Serial.begin(115200);
+
   // Get device ID
   readJumpers();
 
   // Initialise the LLAPSerial library
   LLAP.init( nodeId );
+
+  // Set unused digital pins to input and turn on pull-up resistor
   analogReference(DEFAULT);
-
-  // Set unused digital pins to input and turn on pull-up resistor
   for(int i = 0; i< PIN_COUNT; i++ ) {
     pinMode(inPin[i], INPUT);
     digitalWrite(inPin[i], HIGH);

 * becomes value set on jumpers (5, 10 or 15 mins) 
 *
 * NOTE: For initial testing, wakeup time set to 5mins and battery interval to 4 cycles
 * (c) Andrew D Lindsay 2014
 */

#include "LLAPSerial.h"	// include the library

// Using Sleep Mode 3, SLEEP must be LOW to run, uses interrupt to wakeup
#define SRF_SLEEP 4
#define WAKE_INT 2
// Temperature sensor data line connects to pin 5 on the Arduino
#define ONE_WIRE_BUS 5

// Software configuration defines
