 //
 void loop() {
 
-  //check for any received packets
+  // process inbound messages
   if (radio.ReceiveComplete())
   {
     if (radio.CRCPass())

  oneWireSensors.requestTemperatures();
  sensorData.tempInsideC = oneWireSensors.getTempC(thermometerInside);
  sensorData.tempOutsideC = oneWireSensors.getTempC(thermometerOutside);

  // enable access to sensor data  
  sensorData.available = true;

#define FREQUENCY  RF12_915MHZ //Match this with the version of your Moteino! (others: RF12_433MHZ, RF12_915MHZ)
#define KEY        "ABCDABCDABCDABCD"
#define ACK_TIME   50  // # of ms to wait for an ack
#define TRANSMITPERIOD 5000 //transmit a packet to gateway so often (in ms)

#define SERIAL_BAUD      115200

#define BUFFER_SIZE  64
#define CMD_BOOT     0x10
#define CMD_CONFIG   0x11
#define CMD_READING  0x21
#define PRECISION    100

#define APIN_BATTERY    0  // data connection for photocell
#define APIN_LDR        1  // data connection for photocell
#define DPIN_ONEWIRE    3  // data connection for the Dallas OneWire bus
#define DPIN_HALL       7  // data connection for hall effect
#define DPIN_SENSOR_LED 8
#define DPIN_RF_LED     9

#define VDD_RATIO 1.622

struct SensorData {
  boolean available;
