Measuring temperature based on the expansion or contraction of a material the material being a liquid