Humidity Sensor Based on a Photonic Crystal