Implemented Photoresistor functionality