 
   //Brew Stage cloud functions
   Particle.function("setMode", setBrewMode);
+  Particle.function("checkTemp", checkTemp);
+  Particle.function("checkRate", checkFermentationRate);
 
   // Initialize TFT
   tft.begin(TFT_SPEED);


void postTemp(float temp)
{
  String payload = "{ \"temperature\":" + String(temp, 2) + ", \"time\": \"" + millis() + "\" }";
  Particle.publish(messageBase + "brew/temp", payload);
}

void postFermentationRate()
{
  String payload = "{ \"current_rate\":" + String(fermentationRate, 2) + ", \"time\": \"" + millis() + "\" }";
  Particle.publish(messageBase + "ferment/rate", payload);
}

void printReading(float reading)

  return rate;
}

int checkFermentationRate(String args)
{
  if (isFermentationMode)
  {
    postFermentationRate();

    return 1;
  }

  return 0;
}

int checkTemp(String args)
{
  if (isBrewingMode)
  {
    float temp = readTemp();
    postTemp(temp);

    return 1;
  }

  return 0;
}

void activateBrewStage()
{
  startTime = millis();
