Measuring temperature and humidity with a digital sensor