Hardware connections: Photo resistor: Connect one side of the photoresistor to 5 Volts (5V). Connect the other side of the photoresistor to ANALOG pin 0. Connect a 10K resistor between ANALOG pin 0 and GND. This creates a voltage divider, with the photoresistor one of the two resistors.