 // Data wire is plugged into pin 6 on the Arduino
 #define ONE_WIRE_BUS 6
 
+#define WD_DO_STUFF 1 // How many watchdog interupts before doing real work.
 
 // Singleton instance of the radio driver
 RH_RF95 rf95(RFM95_CS, RFM95_INT);


void loop() {

  tx_payload.setMsgId(++msg_id);

  uint16_t vcc = readVcc();
  tx_payload.setVcc(vcc);

  // Read the temperature while the aref settles.
  tx_payload.setTemperature(readTemperature());

  // Power up the soil sensor.
  digitalWrite(PIN_SENSOR_VCC, HIGH);
  
  tx_payload.setChargeMa(readSolarCurrent());
  tx_payload.setChargeMv(readSolarVolts());
  tx_payload.setLight(readLight(vcc));

}

uint16_t readTemperature() {
  // Send the command to get temperatures
  onewireSensors.requestTemperatures(); 
  return onewireSensors.getTempCByIndex(0);
}

