 /** 
- * LLAPDistance_Remote sketch for Ciseco RFu-328 and Maxbotix XL-EZ3 ultrasonic sensor
- * Availabe form http://www.coolcomponents.co.uk/ultrasonic-range-finder-xl-ez3.html
+ * LLAPDistance_Remote sketch for Ciseco RFu-328 and Maxbotix MB7060 XL-MaxSonar-WR1, Standard edition ultrasonic sensor
  *
- * Transmits reading every 5 minutes
+ * Transmits reading every 30s, 5, 10 or 15 minutes depending on jumpers. Default is 10 minutes
  * Data transmitted is of form aXXUnnn-----
  * Battery readings every 10th cycle  aXXBvvvv----
  *
  * Where XX is the device ID, nnn is the distance to the water in cm, vvvv is battery voltage in mV
  * Other messages sent are: aXXSTARTED upon startup
- * aXXUMax----- and aXXUErr----- if max range is reached or an error in the reading is seen.
+ * aXXUMax----- and aXXUErr----- if max range is reached or an error in the reading is seen, i.e. too close.
  *
  * Sensor is controled using a single N-Channel MOSFET, Gate to SENSOR_ENABLE,
  * Source to GND, Drain to -ve of sensor, Sensor +ve to +3V.

#include <OneWire.h>
#include <DallasTemperature.h>

#define VERSION_STRING "V0.8"

// Number of readings before a battery reading is taken
#define BATTERY_READ_INTERVAL 10

  {
    if (!enterCommandMode()) return 1;
  }
  // Use D9 & D10 links to determine polling interval
  // TODO
  //if (!sendCommand("ATSDDBBA0")) return 2;	// 15 minutes
  //if (!sendCommand("ATSD927C0")) return 2;	// 10 minutes
  if (!sendCommand("ATSD493E0")) return 2;	// 5 minutes
