How are you reading in the data from the thermometer?
Do you want the max from the last cycle or over a couple of cycles?
Why are you looking for the max rather then the average?
Do you have any existing code that we can see?
How is the temperature output?