   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);

double pressure = 0;
double altitude = 0;
double humidity = 0;

// moisture sensor
const int soildThresholdLow = 500;
const int soildThresholdHigh = 3500;
struct SoilSensor {
  int sensor;
  int power;

// main status
int lastSensorStatus = 0, currentSensorStatus = 0;
char publishString[128];
char eventString[10];

// BME280 sensor
Adafruit_BME280 bme;
