Initial temperature measurement code