   // Read the temperature while the aref settles.
   tx_payload.setTemperature(readTemperature());
 
-  // Connect the light sensor to ground.
-  pinMode(PIN_SENSOR_GND, OUTPUT);
-  digitalWrite(PIN_SENSOR_GND, LOW);
-
   // Power up the soil sensor.
-  digitalWrite(PIN_SENSOR_GND, HIGH);
+  digitalWrite(PIN_SENSOR_VCC, HIGH);
   
   tx_payload.setChargeMa(readSolarCurrent());
   tx_payload.setChargeMv(readSolarVolts());

  onewireSensors.begin();
  onewireSensors.getAddress(deviceAddress, 0);

  // Begin the external ADC.
  ads.begin();
}

  tx_payload.setSoil(readSoil(vcc));

  // Power down the soil sensor.
  digitalWrite(PIN_SENSOR_VCC, LOW);

  // Build the payload buffer.
  uint8_t payload_buf[tx_payload.size()];
  tx_payload.serialize(payload_buf);
