Humidity is notoriously difficult to measure. Some of the scientific and electronic considerations to measuring humidity include: analog to digital interface and external circuitry which might require op-amps or oscillator circuitry; temperature compensation adjustments to calculate dew point; calibration against a known humidity source; mounting, protection and response time in the real-world. If you're interested in the details see Tracy Allen's web site (EME Systems) for his discussion.