   Particle.publish("sensor",publishString);
 }
 
+// post to Particle cloud
+void postSoilEventToParticle() {
+  if (soil1 < SOIL_THRESHOLD_LOW) {
+    Particle.publish("plant_alert", "1");
+  }
+  if (soil2 < SOIL_THRESHOLD_LOW) {
+    Particle.publish("plant_alert", "2");
+  }
+  if (soil3 < SOIL_THRESHOLD_LOW) {
+    Particle.publish("plant_alert", "3");
+  }
+}
+
+void postBMEEventToParticle() {
+  if (temperature < TEMPERATURE_THRESHOLD_LOW) {
+    sprintf(eventString, "%0.2f °C", temperature);
+    Particle.publish("temp_alert", eventString);
+  }
+}
+
 // post to SparkFun phant cloud storage
 int postToPhant() {
   phant.add("status", currentSensorStatus);

    delay(190);
    digitalWrite(led, LOW);

    if (soilValue < soildThresholdLow) {
      return 1; // indicate soil is to low
    } else if (soilValue > soildThresholdHigh) {
      return 2; // indicate soil is to high
    } else {
      return 0; // indicate normal reading


// interval counters for measurement and post
const unsigned int MEASUREMENT_RATE = 60000; // read sensor data every 60 sec
const unsigned int POST_RATE = 60 * 60000; // post data every 60 minutes
elapsedMillis lastMeasurement;
elapsedMillis lastPost;

const unsigned int PUBLISHEVENT_TIME_HOUR = 15; // send events ~ 3pm
boolean publishEvents = true;

void setup() {
  Serial.begin(9600);
  Time.zone(1);

  pinMode(led, OUTPUT);
  for (unsigned int i = 0; i < sizeof(soilSensors); i++) {
