You are correct that a cosine function models the situation the easiest, but your function is incorrect.

First of all, the mean temperature would be , which has a difference of from the maximum or minimum. So the amplitude is and the constant added to the function is .

I assume t is measured in seconds. You know that it rotates twice a minute, so once every 30 seconds. This is the period. But in your function, the b value is given by

So your function should be .