Added checking for photoresistor and tested it out