 
 int postToParticle(int status) {
   char publishString[128];
-  sprintf(publishString,"{\"status\": %d, \"temp\": %0.2f, \"pressure\": %0.2f, \"humidity\": %0.2f}",status, temperature, pressure, humidity);
+  sprintf(publishString,"{\"status\": %d, \"temp\": %0.2f, \"pressure\": %0.2f, \"humidity\": %0.2f, , \"soil1\": %u}", status, temperature, pressure, humidity, soil1);
   Particle.publish("sensor",publishString);
   return 1;
 }

  phant.add("temp", temperature, 2);
  phant.add("pressure", pressure, 2);
  phant.add("humidity", humidity, 2);

  return phant.particlePost();
}

int readSensorData() {
  double currentTemperature = 0;
  digitalWrite(led, HIGH);

  currentTemperature = bme.readTemperature();
  pressure = bme.readPressure() / 100.0F;
  altitude = bme.readAltitude(SEALEVELPRESSURE_HPA);
  humidity = bme.readHumidity();
  delay(100);
  digitalWrite(led, LOW);

  Serial.print("Temperature = ");
  Serial.print(currentTemperature);
  Serial.println(" *C");

  Serial.print("Pressure = ");

double altitude = 0;
double humidity = 0;

// moisture sensor
const int soilPower = D4;
const int soilSensor1 = A0;
int soil1 = 0;

// SparkFun phant library
const char server[] = "data.sparkfun.com";
const char publicKey[] = "2JLLbmQoYEsKVxjrQV3a";
