max reading last day

I think I would keep an array of 24 Max-for-the-Hour temperatures. At the end of each hour, replace the oldest value with the value for the just past hour. A quick scan through the 24 values will give you the Max for the previous 24 hours. Display the max for the previous 24 hours or the max for the current hour, whichever is higher. You could do the same for Min temperatures. You could draw graphs of the data. If you have enough memory and want finer resolution, use smaller time intervals: 48 half-hours, 96 quarter hours, 144 10-minute intervals...