   }
 }
 
-// Get the range in cm. Need to enable sensor first then wait briefly for it to power up
-// Also request temperture sensor, if previously detected, to take a reading.
-// Disable sensor after use.
+// Start of Ultrasonic sensor code
 uint16_t getRange() {
+  // Get the range in cm. Need to enable sensor first then wait briefly for it to power up
+  // Also request temperture sensor, if previously detected, to take a reading.
+  // Disable sensor after use.
+  
   int16_t pulse;  // number of pulses from sensor
   int i=0;
   // These values are for calculating a mathematical median for a number of samples as

    delay(5000);	// try again in 5 seconds
  }

  // Repeat "STARTED" message 5 times to alert
  for(int i=0;i<5;i++) {
    LLAP.sendMessage("STARTED");
    delay(1000);
  }

}

  if (!sendCommand("ATDN")) return 4;
  return 5; // success
}
// End of SRF Sleep Code

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