Max Temp LCD Print

/*  
 Thermistor on A0 and LCD I2C Screen. Displaying Single Temp Sensor on Screen. 
 */

#include <LiquidCrystal_I2C.h>
#include <math.h>
#include <Wire.h> 

/*
LCD Connections:
 scl-a5, sda-a4, grd-grd, vcc-5v
 */

LiquidCrystal_I2C lcd(0x3F,20,4);  // set the LCD address to 0x3F for a 20 chars and 4 line display

void setup()
{
  lcd.init();                      // initialize the lcd 
  lcd.backlight();
  Serial.begin(9600);

}



double Thermister(int RawADC) {
  double Temp;
  // See http://en.wikipedia.org/wiki/Thermistor for explanation of formula
  Temp = log(((10240000/RawADC) - 10000));
  Temp = 1 / (1.652570365e-3 + (1.582194868e-4 * Temp) + (3.125375165e-7 * Temp * Temp * Temp));
  Temp = Temp - 273.15;           // Convert Kelvin to Celcius
  return Temp;
}

void printTemp(void) {
  double fTemp;
  double temp = Thermister(analogRead(0));  // Read sensor
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print("Temperature is:");
  lcd.setCursor(0,1);
  lcd.print(temp);
  lcd.print(" C / ");
  fTemp = (temp * 1.8) + 32.0;    // Convert to USA
  lcd.print(fTemp);
  lcd.print(" F");
  if (fTemp > 200 && fTemp < 260) {
    lcd.setCursor(0,3);
    lcd.print("HOT");
  }
  double maxTemp = 0; 
  if(fTemp > maxTemp) maxTemp = fTemp; // display max temp
  lcd.setCursor(0,4);
  lcd.print (maxTemp);  
}

void loop(void) {
  printTemp();
  delay(1000);
}

When I run this code the Max Temp changes freely with fTemp.

What I am trying to do is to show the Max Temp and hold it on the screen.

Please use code tags. Please don't start duplicate threads.

I can't do the calculation of fTemp = (temp * 1.smiley-cool + 32.0; // Convert to USA

I don't seem to have a smiley-cool key on my PC,

lar3ry:
Please use code tags. Please don't start duplicate threads.

I can't do the calculation of fTemp = (temp * 1.smiley-cool + 32.0; // Convert to USA

I don't seem to have a smiley-cool key on my PC,

Forgot about the code tags, fixed.

It just double posted, thanks for letting me know I edited the other post but it will not let me remove nor report it to the moderator :confused:

This  double maxTemp = 0; is your problem.

You keep redeclaring it and setting it to 0.
Make it global or declare it where it is, as static.