   float celcius = tempData - 273.15;
   float fahrenheit = (celcius*1.8) + 32;
   
-  //if (Serial) {
-    // Print fahrenheit value.
-    // Serial.println(fahrenheit);
-  //}
-  
-  //if (fahrenheit > 79.f)
-  //  digitalWrite(ledPin, HIGH);
-  //else
-  //  digitalWrite(ledPin, LOW);
-
   return fahrenheit;
 }
 

  return maxR-minR;
}

void alarm() {
  digitalWrite(buzzPin, HIGH);
  delay(1000);
  digitalWrite(buzzPin, LOW);
}

void loop() {
  double tt = readTemp();
  int tv = readVol();
  if (tt > temp)
    temp = tt;
  if (tv > vol)
    vol = tv;
  cycle++;
  if (cycle == 60) {
    cycle = 0;
    if (Serial) {
      Serial.print(temp);
      Serial.print(" ");
      Serial.println(vol);
    }
    temp = 0;
    vol = 0;
  }
  if (Serial.available() > 4) {
    int hour = Serial.parseInt();
    display.write(hour/10);
    display.write(hour%10);
    int minute = Serial.parseInt();
    display.write(minute/10);
    display.write(minute%10);
  }
  if (!flash) {
    flash = true;
    display.write(0x77);
    display.write(0b00010000);
  } else {
    flash = false;
    display.write(0x77);
    display.write((byte) 0);
  }
  // alarm();
  delay(1000); // wait a second before printing again
}


SoftwareSerial display(8, 9);

int mphonePin = 0;
int buzzPin = 10;
int cycle = 0, vol = 0;
double temp = 0, ref = 0;
boolean flash = false, sample = false, alarm = false, buzz = LOW;

void setup(){
  Serial.begin(9600);
