Digital high-precision temperature and humidity sensor