How to do temperature detection

How to do temperature detection