Added management for photoresistor