Create an array to store the historical temp records. You can either push them onto the front end, which would require moving all the values every time you add one, or round robin the index. I'd do the second option, which not only doesn't make you move all the values every time, but also gives you some cool indexing options. There are 1440 minutes in one day, so you could make a 1440 element array and you'd have all the values for the last 24 hours, which would require math to translate current or desired time into array index. Or, if you have the memory to blow, you could create a 2359 element array, then the current military time, 1433 or whatever, becomes the array index directly. This method seems cleaner, but wastes memory and the unused array elements would also need to be accounted for if you do bulk math on the array, like take an average over a time period.