   return 0;
 }
 
-int checkVoltage()
+int getBatteryPercantage()
 {
   int voltage = analogRead(BATT) * 0.0011224;
 


  if (currentMillis - previousBattMillis > battInterval)
  {
    int voltage = checkVoltage();

    displayVoltage(voltage);
    Particle.publish(messageBase + "voltage", String(voltage));

    // If voltage < 30%, show a low batt message and publish message to cloud
    if (voltage < BATT_LOW_VOLTAGE)
    {
      displayLowBattAlert();
      Particle.publish(messageBase + "alert", "low-batt");

  printSubheadingLine("Waiting for Brew...");

  // Check and display the battery level
  int voltage = getBatteryPercantage();
  displayBattLevel(voltage);

  //Connect to Azure MQTT Server
  /* client.connect("e00fce681290df8ab5487791", "brew-buddy-hub.azure-devices.net/e00fce681290df8ab5487791/?api-version=2018-06-30", "SharedAccessSignature sr=brew-buddy-hub.azure-devices.net&sig=RKWH%2FV8CD595YeAnXOZ8jXsSYMnWf6RiJBnzhUoxCzE%3D&skn=iothubowner&se=1552683541");
