Or even easier (I think) to use a DS1820 type sensor.
There has to be at least a dozen examples here on the forums.