photoresistor testing code