I am starting to play with my Arduino Uno and have a question about hooking a photoresistor to my Uno. Most tutorials connect the photoresistor like this using a second resistor:
I think this technique is called a "voltage divider" and I understand how it can be used to read the variable voltage drop that occurs from the PhotoResistor.
My question is why can't I just measure the drop without the 10K resistor? In other words, would the following work (where we read the voltage drop from Pin X)?
You can manage without the second resistor. Connect the photoresistor between the analog input pin and ground, and make a pinMode call to enable the internal pullup resistor by setting pin mode INPUT_PULLUP (or by writing a HIGH to the pin while leaving it set as an input).