 }
 // End of SRF command functions
 
+/** setup - Regular Arduino setup function. 
+ * We setup the I/O pins, read jumpers and start the sensor
+ */
 void setup() {
-  // initialise serial interface for debugging/SRF communication:
+  // initialise serial interface for SRF communication:
   Serial.begin(115200);
 
   // Get device ID


  // setup the selected polling interval
  if (!sendCommand( pollingIntervalCmds[inPolling]) ) return 2;
  //  if (!sendCommand( pollingIntervalCmds[selectedPollingInterval]) ) return 2;
  if (!sendCommand("ATSM3")) return 3;
  if (!sendCommand("ATDN")) return 4;
  return 5; // success
}
// end of SRF sleep code

// Start of SRF command functions
uint8_t enterCommandMode()
{
  delay(1200);

// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);

// Pass our oneWire reference to Dallas Temperature library.
DallasTemperature sensors(&oneWire);

// arrays to hold device address
DeviceAddress temperatureSensor;

// Define pins that are not used and are to be made inputs for power saving
// TODO: Check usage of all pins
#define PIN_COUNT 5

uint8_t inPin[] = { 
  9, 10, 11, 12, 13 };

// Other global variables
boolean tempSensorFound = false;
